mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-28 23:10:51 +00:00
[automated] Apply Coding Standard (#922)
Co-authored-by: TomasVotruba <TomasVotruba@users.noreply.github.com>
This commit is contained in:
parent
ce0fdfdee4
commit
f2132237d6
|
@ -11,7 +11,6 @@ use PHPStan\Type\MixedType;
|
|||
use PHPStan\Type\NeverType;
|
||||
use PHPStan\Type\Type;
|
||||
use PHPStan\Type\VoidType;
|
||||
use PHPStan\Type\UnionType;
|
||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
|
||||
use Rector\NodeTypeResolver\PHPStan\Type\TypeFactory;
|
||||
use Rector\PHPStanStaticTypeMapper\DoctrineTypeAnalyzer;
|
||||
|
@ -89,7 +88,7 @@ final class PropertyTypeInferer
|
|||
continue;
|
||||
}
|
||||
|
||||
if ($property->type == null && $type instanceof AliasedObjectType && $hasByVarName) {
|
||||
if ($property->type === null && $type instanceof AliasedObjectType && $hasByVarName) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace Rector\PHPStanRules\Rules;
|
|||
|
||||
use Nette\Utils\Strings;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use Symplify\PHPStanRules\Rules\AbstractSymplifyRule;
|
||||
|
|
|
@ -30,10 +30,24 @@ final class PhpUpgradeDowngradeRegisteredInSetRuleTest extends AbstractServiceAw
|
|||
{
|
||||
yield [__DIR__ . '/Fixture/SkipSomePhpFeatureRector.php', []];
|
||||
yield [__DIR__ . '/Fixture/SomePhpFeatureRector.php', [
|
||||
[sprintf(PhpUpgradeDowngradeRegisteredInSetRule::ERROR_MESSAGE, 'Rector\Php80\Rector\Class_\SomePhpFeatureRector', 'php80'), 7]
|
||||
[
|
||||
sprintf(
|
||||
PhpUpgradeDowngradeRegisteredInSetRule::ERROR_MESSAGE,
|
||||
'Rector\Php80\Rector\Class_\SomePhpFeatureRector',
|
||||
'php80'
|
||||
),
|
||||
7,
|
||||
],
|
||||
]];
|
||||
yield [__DIR__ . '/Fixture/SomePhpFeature2Rector.php', [
|
||||
[sprintf(PhpUpgradeDowngradeRegisteredInSetRule::ERROR_MESSAGE, 'Rector\DowngradePhp80\Rector\Class_\SomePhpFeature2Rector', 'downgrade-php80'), 7]
|
||||
[
|
||||
sprintf(
|
||||
PhpUpgradeDowngradeRegisteredInSetRule::ERROR_MESSAGE,
|
||||
'Rector\DowngradePhp80\Rector\Class_\SomePhpFeature2Rector',
|
||||
'downgrade-php80'
|
||||
),
|
||||
7,
|
||||
],
|
||||
]];
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,13 @@ final class PhpUpgradeImplementsMinPhpVersionInterfaceRuleTest extends AbstractS
|
|||
yield [__DIR__ . '/Fixture/SkipDowngradeRector.php', []];
|
||||
yield [__DIR__ . '/Fixture/SkipAlreadyImplementsMinPhpVersionRector.php', []];
|
||||
yield [__DIR__ . '/Fixture/SomePhpFeatureRector.php', [
|
||||
[sprintf(PhpUpgradeImplementsMinPhpVersionInterfaceRule::ERROR_MESSAGE, 'Rector\Php80\Rector\Class_\SomePhpFeatureRector'), 7]
|
||||
[
|
||||
sprintf(
|
||||
PhpUpgradeImplementsMinPhpVersionInterfaceRule::ERROR_MESSAGE,
|
||||
'Rector\Php80\Rector\Class_\SomePhpFeatureRector'
|
||||
),
|
||||
7,
|
||||
],
|
||||
]];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user