This commit is contained in:
TomasVotruba 2017-10-04 08:57:48 +02:00
parent 535e54c80b
commit d8d18d8479
3 changed files with 3 additions and 2 deletions

View File

@ -55,6 +55,7 @@ parameters:
# classes might not exist
- */src/Rector/Contrib/*/*Rector.php
- packages/DeprecationExtractor/tests/Rector/RectorFactoryTest.php
- packages/NodeTypeResolver/src/NodeVisitor/TypeResolver.php
PHP_CodeSniffer\Standards\Generic\Sniffs\Files\LineLengthSniff:
# long FQN classes that might not exist
- src/Rector/Contrib/Symfony/FrameworkBundle/FrameworkBundleClassReplacementsRector.php

View File

@ -22,6 +22,7 @@ final class MethodReflector
try {
$classReflection = $this->classReflector->reflect($class);
} catch (IdentifierNotFound $identifierNotFoundException) {
// class doesn't exist
return null;
}

View File

@ -2,7 +2,6 @@
namespace Rector\NodeTypeResolver\NodeVisitor;
use Nette\DI\Container;
use PhpParser\Node;
use PhpParser\Node\Expr\ArrayDimFetch;
use PhpParser\Node\Expr\Assign;
@ -319,7 +318,7 @@ final class TypeResolver extends NodeVisitorAbstract
private function fallbackStaticType(string $type, string $methodName): ?string
{
if ($type === 'Nette\Config\Configurator' && $methodName === 'createContainer') {
return Container::class;
return 'Nette\DI\Container';
}
return null;