mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
Use PHP-CS-FIXER 2.0
This commit is contained in:
parent
e221047351
commit
9efcc24cdd
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,8 @@
|
|||||||
/vendor/
|
/vendor/
|
||||||
|
/composer.phar
|
||||||
/composer.lock
|
/composer.lock
|
||||||
/.php_cs.cache
|
/.php_cs.cache
|
||||||
|
/.php_cs
|
||||||
/phpunit.xml
|
/phpunit.xml
|
||||||
/Tests/Functional/cache
|
/Tests/Functional/cache
|
||||||
/Tests/Functional/logs
|
/Tests/Functional/logs
|
||||||
|
27
.php_cs
27
.php_cs
@ -1,27 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Symfony\CS\Config\Config;
|
|
||||||
use Symfony\CS\Finder\DefaultFinder;
|
|
||||||
use Symfony\CS\Fixer\Contrib\HeaderCommentFixer;
|
|
||||||
use Symfony\CS\FixerInterface;
|
|
||||||
|
|
||||||
$finder = DefaultFinder::create()
|
|
||||||
->in(__DIR__)
|
|
||||||
;
|
|
||||||
|
|
||||||
$header = <<<EOF
|
|
||||||
This file is part of the ApiDocBundle package.
|
|
||||||
|
|
||||||
(c) EXSyst
|
|
||||||
|
|
||||||
For the full copyright and license information, please view the LICENSE
|
|
||||||
file that was distributed with this source code.
|
|
||||||
EOF;
|
|
||||||
HeaderCommentFixer::setHeader($header);
|
|
||||||
|
|
||||||
return Config::create()
|
|
||||||
->level(FixerInterface::SYMFONY_LEVEL)
|
|
||||||
->fixers(['header_comment', 'short_array_syntax'])
|
|
||||||
->finder($finder)
|
|
||||||
->setUsingCache(true)
|
|
||||||
;
|
|
25
.php_cs.dist
Normal file
25
.php_cs.dist
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$finder = PhpCsFixer\Finder::create()
|
||||||
|
->in(__DIR__)
|
||||||
|
->exclude('tests/Fixtures/app/cache')
|
||||||
|
;
|
||||||
|
|
||||||
|
return PhpCsFixer\Config::create()
|
||||||
|
->setRules([
|
||||||
|
'@Symfony' => true,
|
||||||
|
'ordered_imports' => true,
|
||||||
|
'phpdoc_order' => true,
|
||||||
|
'header_comment' => [
|
||||||
|
'header' => <<<COMMENT
|
||||||
|
This file is part of the ApiDocBundle package.
|
||||||
|
|
||||||
|
(c) EXSyst
|
||||||
|
|
||||||
|
For the full copyright and license information, please view the LICENSE
|
||||||
|
file that was distributed with this source code.
|
||||||
|
COMMENT
|
||||||
|
],
|
||||||
|
])
|
||||||
|
->setFinder($finder)
|
||||||
|
;
|
@ -13,11 +13,11 @@ namespace EXSyst\Bundle\ApiDocBundle\Tests\Describer;
|
|||||||
|
|
||||||
use EXSyst\Bundle\ApiDocBundle\Describer\RouteDescriber;
|
use EXSyst\Bundle\ApiDocBundle\Describer\RouteDescriber;
|
||||||
use EXSyst\Bundle\ApiDocBundle\RouteDescriber\RouteDescriberInterface;
|
use EXSyst\Bundle\ApiDocBundle\RouteDescriber\RouteDescriberInterface;
|
||||||
|
use EXSyst\Component\Swagger\Swagger;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
|
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
|
||||||
use Symfony\Component\DependencyInjection\Container;
|
use Symfony\Component\DependencyInjection\Container;
|
||||||
use Symfony\Component\Routing\Route;
|
use Symfony\Component\Routing\Route;
|
||||||
use Symfony\Component\Routing\RouteCollection;
|
use Symfony\Component\Routing\RouteCollection;
|
||||||
use EXSyst\Component\Swagger\Swagger;
|
|
||||||
|
|
||||||
class RouteDescriberTest extends AbstractDescriberTest
|
class RouteDescriberTest extends AbstractDescriberTest
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user