mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-31 16:30:51 +00:00
[Scoped] Fixing Scoped build bin rector.php (#1174)
This commit is contained in:
parent
41eda59ff9
commit
66800f00f1
|
@ -10,7 +10,6 @@ use PHPStan\Analyser\Scope;
|
|||
use PHPStan\Reflection\ClassReflection;
|
||||
use PHPStan\Type\StaticType;
|
||||
use Rector\BetterPhpDocParser\PhpDocParser\PhpDocFromTypeDeclarationDecorator;
|
||||
use Rector\Core\Exception\ShouldNotHappenException;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
|
||||
|
@ -74,7 +73,7 @@ CODE_SAMPLE
|
|||
{
|
||||
$scope = $node->getAttribute(AttributeKey::SCOPE);
|
||||
if (! $scope instanceof Scope) {
|
||||
throw new ShouldNotHappenException();
|
||||
return null;
|
||||
}
|
||||
|
||||
$classReflection = $scope->getClassReflection();
|
||||
|
|
Loading…
Reference in New Issue
Block a user