<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;

require 'vendor/autoload.php';

$finder = Finder::create()->in(['src', 'tests']);
$header = <<< EOF
This file is part of Arrounded

(c) Madewithlove <heroes@madewithlove.be>

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;

return Config::create()
             ->setRiskyAllowed(true)
             ->setRules([
                 '@Symfony'                                  => true,
                 'align_double_arrow'                        => false,
                 'align_equals'                              => false,
                 'concat_with_spaces'                        => false,
                 'echo_to_print'                             => true,
                 'ereg_to_preg'                              => true,
                 'header_comment'                            => ['header' => $header],
                 'linebreak_after_opening_tag'               => true,
                 'long_array_syntax'                         => false,
                 'no_blank_lines_before_namespace'           => true,
                 'no_multiline_whitespace_before_semicolons' => true,
                 'no_php4_constructor'                       => true,
                 'no_short_echo_tag'                         => true,
                 'no_useless_return'                         => true,
                 'not_operator_with_space'                   => false,
                 'not_operator_with_successor_space'         => false,
                 'ordered_imports'                           => true,
                 'php_unit_construct'                        => true,
                 'php_unit_strict'                           => false,
                 'phpdoc_order'                              => true,
                 'phpdoc_property'                           => true,
                 'phpdoc_var_to_type'                        => false,
                 'psr0'                                      => true,
                 'short_array_syntax'                        => true,
                 'strict_comparison'                         => true,
                 'strict_param'                              => true,
             ])
             ->setUsingCache(true)
             ->finder($finder);
