<?php

$excludeDirs = [
    'admin/core/barcodes',
    'admin/core/blade',
    'admin/core/html',
    'admin/core/lib',
    'admin/core/pdf',
    'admin/core/rtf',
    'admin/core/sypexgeo',
    'admin/core/xls',
];

$finder = PhpCsFixer\Finder::create()
    ->in(__DIR__ . '/../www')
    ->exclude($excludeDirs)
;

$config = new PhpCsFixer\Config();
return $config->setRules([
    '@PSR12' => true,
    'array_syntax' => ['syntax' => 'short'],
    'braces_position' => ['functions_opening_brace' => 'same_line', 'classes_opening_brace' => 'same_line']
])
    ->setCacheFile(__DIR__ . '/.var/.php_cs')
    ->setFinder($finder)
    ;