2015-03-24 16:36:00 +00:00
|
|
|
<?php
|
|
|
|
|
2017-09-08 14:50:13 +01:00
|
|
|
if (!file_exists(__DIR__.'/src')) {
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|
2016-12-03 09:46:32 +00:00
|
|
|
return PhpCsFixer\Config::create()
|
|
|
|
->setRules(array(
|
|
|
|
'@Symfony' => true,
|
|
|
|
'@Symfony:risky' => true,
|
|
|
|
'array_syntax' => array('syntax' => 'long'),
|
2017-09-11 06:17:31 +01:00
|
|
|
'protected_to_private' => false,
|
2016-06-20 17:23:25 +01:00
|
|
|
))
|
2016-12-03 09:46:32 +00:00
|
|
|
->setRiskyAllowed(true)
|
|
|
|
->setFinder(
|
|
|
|
PhpCsFixer\Finder::create()
|
2017-01-20 15:16:44 +00:00
|
|
|
->in(__DIR__.'/src')
|
2017-09-07 10:04:22 +01:00
|
|
|
->append(array(__FILE__))
|
2015-03-24 21:20:39 +00:00
|
|
|
->exclude(array(
|
|
|
|
// directories containing files with content that is autogenerated by `var_export`, which breaks CS in output code
|
2017-01-21 16:45:58 +00:00
|
|
|
'Symfony/Component/DependencyInjection/Tests/Fixtures',
|
|
|
|
'Symfony/Component/Routing/Tests/Fixtures/dumper',
|
2015-03-24 21:20:39 +00:00
|
|
|
// fixture templates
|
2017-01-21 16:45:58 +00:00
|
|
|
'Symfony/Component/Templating/Tests/Fixtures/templates',
|
|
|
|
'Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom',
|
2016-06-21 06:43:49 +01:00
|
|
|
// generated fixtures
|
2017-01-21 16:53:15 +00:00
|
|
|
'Symfony/Component/VarDumper/Tests/Fixtures',
|
2015-03-24 21:20:39 +00:00
|
|
|
// resource templates
|
2017-01-21 16:45:58 +00:00
|
|
|
'Symfony/Bundle/FrameworkBundle/Resources/views/Form',
|
2015-03-24 21:20:39 +00:00
|
|
|
))
|
|
|
|
// file content autogenerated by `var_export`
|
2017-01-21 16:45:58 +00:00
|
|
|
->notPath('Symfony/Component/Translation/Tests/fixtures/resources.php')
|
2015-03-24 21:20:39 +00:00
|
|
|
// autogenerated xmls
|
2017-01-21 16:45:58 +00:00
|
|
|
->notPath('Symfony/Component/Console/Tests/Fixtures/application_1.xml')
|
|
|
|
->notPath('Symfony/Component/Console/Tests/Fixtures/application_2.xml')
|
2015-03-24 21:20:39 +00:00
|
|
|
// yml
|
2017-01-21 16:45:58 +00:00
|
|
|
->notPath('Symfony/Component/Yaml/Tests/Fixtures/sfTests.yml')
|
2015-03-24 21:20:39 +00:00
|
|
|
// test template
|
2017-01-21 16:45:58 +00:00
|
|
|
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
|
2015-12-21 11:01:57 +00:00
|
|
|
// explicit heredoc test
|
2017-01-21 16:45:58 +00:00
|
|
|
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php')
|
2017-03-17 19:10:06 +00:00
|
|
|
// purposefully invalid JSON
|
|
|
|
->notPath('Symfony/Component/Asset/Tests/fixtures/manifest-invalid.json')
|
2015-03-24 21:20:39 +00:00
|
|
|
)
|
2015-03-24 16:36:00 +00:00
|
|
|
;
|