House keeping in cs fixer config and makefile (#196)
This commit is contained in:
parent
3b31954ac6
commit
a07083a65a
2 changed files with 17 additions and 21 deletions
|
|
@ -1,45 +1,41 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of the Symfony package.
|
* This file is part of the official PHP MCP SDK.
|
||||||
*
|
*
|
||||||
* (c) Fabien Potencier <fabien@symfony.com>
|
* A collaboration between Symfony and the PHP Foundation.
|
||||||
*
|
*
|
||||||
* For the full copyright and license information, please view the LICENSE
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use PhpCsFixer\Config;
|
||||||
|
use PhpCsFixer\Finder;
|
||||||
|
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
|
||||||
|
|
||||||
if (!file_exists(__DIR__.'/src')) {
|
if (!file_exists(__DIR__.'/src')) {
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
$fileHeaderParts = [
|
$fileHeader = <<<'EOF'
|
||||||
<<<'EOF'
|
This file is part of the official PHP MCP SDK.
|
||||||
This file is part of the official PHP MCP SDK.
|
|
||||||
|
|
||||||
A collaboration between Symfony and the PHP Foundation.
|
A collaboration between Symfony and the PHP Foundation.
|
||||||
|
|
||||||
EOF,
|
For the full copyright and license information, please view the LICENSE
|
||||||
<<<'EOF'
|
file that was distributed with this source code.
|
||||||
|
EOF;
|
||||||
|
|
||||||
For the full copyright and license information, please view the LICENSE
|
return (new Config())
|
||||||
file that was distributed with this source code.
|
->setParallelConfig(ParallelConfigFactory::detect())
|
||||||
EOF,
|
|
||||||
];
|
|
||||||
|
|
||||||
return (new PhpCsFixer\Config())
|
|
||||||
// @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/7777
|
|
||||||
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
|
|
||||||
->setRules([
|
->setRules([
|
||||||
'@Symfony' => true,
|
'@Symfony' => true,
|
||||||
'@Symfony:risky' => true,
|
'@Symfony:risky' => true,
|
||||||
'protected_to_private' => false,
|
'protected_to_private' => false,
|
||||||
'declare_strict_types' => false,
|
'declare_strict_types' => false,
|
||||||
'header_comment' => [
|
'header_comment' => ['header' => $fileHeader],
|
||||||
'header' => implode('', $fileHeaderParts),
|
|
||||||
],
|
|
||||||
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
|
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
|
||||||
])
|
])
|
||||||
->setRiskyAllowed(true)
|
->setRiskyAllowed(true)
|
||||||
->setFinder((new PhpCsFixer\Finder())->in(__DIR__))
|
->setFinder((new Finder())->in(__DIR__))
|
||||||
;
|
;
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -1,4 +1,4 @@
|
||||||
.PHONY: deps-stable deps-low cs rector phpstan tests coverage run-examples ci ci-stable ci-lowest
|
.PHONY: deps-stable deps-low cs phpstan tests unit-tests inspector-tests coverage ci ci-stable ci-lowest
|
||||||
|
|
||||||
deps-stable:
|
deps-stable:
|
||||||
composer update --prefer-stable
|
composer update --prefer-stable
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue