phpstan lvl 0

This commit is contained in:
TomasVotruba 2017-11-06 11:40:43 +01:00
parent 6e37aef635
commit 8924f3e03c
5 changed files with 20 additions and 3 deletions

View File

@ -48,6 +48,7 @@
"Rector\\BetterReflection\\Tests\\": "packages/BetterReflection/tests",
"Rector\\ReflectionDocBlock\\Tests\\": "packages/ReflectionDocBlock/tests",
"Rector\\NodeTypeResolver\\Tests\\": "packages/NodeTypeResolver/tests",
"Rector\\NodeTraverserQueue\\Tests\\": "packages/NodeTraverserQueue/tests",
"Rector\\DeprecationExtractor\\Tests\\": "packages/DeprecationExtractor/tests",
"Rector\\NodeValueResolver\\Tests\\": "packages/NodeValueResolver/tests"
}
@ -56,7 +57,7 @@
"all": ["@check-cs", "phpunit"],
"check-cs": "ecs check bin packages src tests",
"fix-cs": "ecs check bin packages src tests --fix",
"phpstan": "vendor/bin/phpstan.phar analyse packages src tests --level 0"
"phpstan": "vendor/bin/phpstan.phar analyse packages src tests --level 0 --configuration phpstan.neon"
},
"bin": [
"bin/rector",

View File

@ -1,9 +1,10 @@
<?php declare(strict_types=1);
namespace Rector\ReflectionDocBlock\DocBlock;
namespace Rector\ReflectionDocBlock\Tests\DocBlock;
use phpDocumentor\Reflection\DocBlock;
use PhpParser\Node\Scalar\String_;
use Rector\ReflectionDocBlock\DocBlock\DocBlockFactory;
use Rector\Tests\AbstractContainerAwareTestCase;
final class DocBlockFactoryTest extends AbstractContainerAwareTestCase

12
phpstan.neon Normal file
View File

@ -0,0 +1,12 @@
parameters:
ignoreErrors:
# property overriden
- '#Rector\\NodeTraverser\\(Cloning|Shutdown)NodeTraverser::__construct\(\) does not call parent constructor from PhpParser\\NodeTraverser#'
excludes_analyse:
# test files
- '*tests/Rector/Contrib/Nette/Routing/BootstrapToRouterFactoryRector/Wrong/bootstrap.php'
- '*tests/Rector/Dynamic/MethodNameReplacerRector/wrong/*'
- '*tests/Rector/Dynamic/MethodNameReplacerRector/correct/*'
- '*packages/**/tests/**/**Source/**'
- '*packages/**/tests/**Source/**'

View File

@ -1,6 +1,6 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Configuration;
namespace Rector\Tests\Configuration\Normalizer;
use PHPUnit\Framework\TestCase;
use Rector\Configuration\Normalizer\RectorClassNormalizer;

View File

@ -1,9 +1,12 @@
<?php declare(strict_types=1);
namespace Rector\Tests\Configuration\Validator;
use PHPUnit\Framework\TestCase;
use Rector\Configuration\Validator\RectorClassValidator;
use Rector\Contract\Rector\RectorInterface;
use Rector\Exception\Validator\InvalidRectorClassException;
use stdClass;
final class RectorClassValidatorTest extends TestCase
{