mirror of
https://github.com/justinrainbow/json-schema.git
synced 2025-01-16 12:48:19 +01:00
cddbef1378
* refactor: Replace traditional syntax array with short syntax array * docs: Update changelog
35 lines
1007 B
PHP
35 lines
1007 B
PHP
<?php
|
|
|
|
$finder = new PhpCsFixer\Finder();
|
|
$config = new PhpCsFixer\Config('json-schema');
|
|
$finder->in(__DIR__);
|
|
|
|
/* Based on ^2.1 of php-cs-fixer */
|
|
$config
|
|
->setRules([
|
|
// default
|
|
'@PSR2' => true,
|
|
'@Symfony' => true,
|
|
// additionally
|
|
'array_syntax' => ['syntax' => 'short'],
|
|
'binary_operator_spaces' => false,
|
|
'concat_space' => ['spacing' => 'one'],
|
|
'increment_style' => false,
|
|
'no_superfluous_phpdoc_tags' => false,
|
|
'no_useless_else' => true,
|
|
'no_useless_return' => true,
|
|
'ordered_imports' => true,
|
|
'phpdoc_no_package' => false,
|
|
'phpdoc_order' => true,
|
|
'phpdoc_summary' => false,
|
|
'phpdoc_types_order' => ['null_adjustment' => 'none', 'sort_algorithm' => 'none'],
|
|
'simplified_null_return' => false,
|
|
'single_line_throw' => false,
|
|
'trailing_comma_in_multiline' => false,
|
|
'yoda_style' => false,
|
|
])
|
|
->setFinder($finder)
|
|
;
|
|
|
|
return $config;
|