Skip to content

Commit

Permalink
remove isStaticType() method, already switched to type
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Oct 7, 2021
1 parent 271e13e commit 7de0a0b
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 150 deletions.
21 changes: 0 additions & 21 deletions packages/NodeTypeResolver/NodeTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
use PHPStan\Type\TypeWithClassName;
use PHPStan\Type\UnionType;
use Rector\Core\Configuration\RenamedClassesDataCollector;
use Rector\Core\Exception\ShouldNotHappenException;
use Rector\Core\NodeAnalyzer\ClassAnalyzer;
use Rector\NodeTypeResolver\Contract\NodeTypeResolverInterface;
use Rector\NodeTypeResolver\Node\AttributeKey;
Expand Down Expand Up @@ -268,26 +267,6 @@ public function isNumberType(Node $node): bool
return $nodeType instanceof FloatType;
}

/**
* @deprecated
* Use @see NodeTypeResolver::resolve() instead and instanceof directly
*
* @param class-string<Type> $staticTypeClass
*/
public function isStaticType(Node $node, string $staticTypeClass): bool
{
if (! is_a($staticTypeClass, Type::class, true)) {
throw new ShouldNotHappenException(sprintf(
'"%s" in "%s()" must be type of "%s"',
$staticTypeClass,
__METHOD__,
Type::class
));
}

return is_a($this->getType($node), $staticTypeClass);
}

/**
* @param class-string<Type> $desiredType
*/
Expand Down
99 changes: 0 additions & 99 deletions rules/Restoration/Type/ConstantReturnToParamTypeConverter.php

This file was deleted.

30 changes: 0 additions & 30 deletions rules/Restoration/ValueObject/InferParamFromClassMethodReturn.php

This file was deleted.

0 comments on commit 7de0a0b

Please sign in to comment.