2020-04-26 11:36:41 +02:00
|
|
|
<?php
|
2020-06-19 09:28:58 +02:00
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
require_once './vendor/autoload.php';
|
|
|
|
|
2020-09-23 12:33:09 +02:00
|
|
|
use Nextcloud\CodingStandard\Config as NextcloudConfig;
|
|
|
|
use PhpCsFixer\Config;
|
2020-06-19 09:28:58 +02:00
|
|
|
|
2020-09-23 12:33:09 +02:00
|
|
|
$nextcloudConfig = new NextcloudConfig();
|
2020-06-19 09:28:58 +02:00
|
|
|
$config = new Config();
|
2020-09-23 12:33:09 +02:00
|
|
|
|
|
|
|
$rules = $nextcloudConfig->getRules();
|
|
|
|
$rules['ordered_imports'] = ['sort_algorithm' => 'alpha'];
|
|
|
|
|
2020-06-19 09:28:58 +02:00
|
|
|
$config
|
2020-09-23 12:33:09 +02:00
|
|
|
->setIndent("\t")
|
|
|
|
->setRules($rules)
|
2020-06-19 09:28:58 +02:00
|
|
|
->getFinder()
|
|
|
|
->ignoreVCSIgnored(true)
|
|
|
|
->notPath('build')
|
|
|
|
->notPath('l10n')
|
|
|
|
->notPath('src')
|
|
|
|
->notPath('vendor')
|
|
|
|
->in(__DIR__);
|
|
|
|
return $config;
|