Skip to content

Commit

Permalink
[Scoped] Fixing Scoped build bin rector.php (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Nov 7, 2021
1 parent 41eda59 commit 66800f0
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
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;
Expand Down Expand Up @@ -74,7 +73,7 @@ public function refactor(Node $node): ?Node
{
$scope = $node->getAttribute(AttributeKey::SCOPE);
if (! $scope instanceof Scope) {
throw new ShouldNotHappenException();
return null;
}

$classReflection = $scope->getClassReflection();
Expand Down

0 comments on commit 66800f0

Please sign in to comment.