mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
37 lines
955 B
PHP
37 lines
955 B
PHP
<?php
|
|
|
|
$dirToParse = 'tests/acceptance/';
|
|
$dirIterator = new DirectoryIterator(__DIR__ . '/' . $dirToParse);
|
|
|
|
$excludeDirs = [
|
|
'node_modules',
|
|
'vendor-php'
|
|
];
|
|
|
|
$finder = PhpCsFixer\Finder::create()
|
|
->exclude($excludeDirs)
|
|
->in(__DIR__);
|
|
|
|
$ocRule = (new OC\CodingStandard\Config())->getRules();
|
|
$config = new PhpCsFixer\Config();
|
|
$config->setFinder($finder)
|
|
->setIndent("\t")
|
|
->setRules(
|
|
array_merge(
|
|
$ocRule,
|
|
[
|
|
"return_type_declaration" => [
|
|
"space_before" => "none",
|
|
],
|
|
'single_space_around_construct' => true,
|
|
'no_unused_imports' => true,
|
|
'array_indentation' => true,
|
|
'method_chaining_indentation' => true,
|
|
'trailing_comma_in_multiline' => true,
|
|
'no_useless_else' => true,
|
|
]
|
|
)
|
|
);
|
|
$config->setFinder($finder);
|
|
return $config;
|