Updated Rector to commit 1f9829d2a3820f39fe0601b996c5cba71ffb42b0

1f9829d2a3 [Strict] Add StaticProperty supporton may be unitialized static property on DisallowedEmptyRuleFixerRector (#5428)
This commit is contained in:
Tomas Votruba 2024-01-04 15:49:28 +00:00
parent da887b253b
commit 5457aea4e0
2 changed files with 5 additions and 4 deletions

View File

@ -5,6 +5,7 @@ namespace Rector\Strict\NodeAnalyzer;
use PhpParser\Node\Expr;
use PhpParser\Node\Expr\PropertyFetch;
use PhpParser\Node\Expr\StaticPropertyFetch;
use PhpParser\Node\Stmt\ClassLike;
use PhpParser\Node\Stmt\Property;
use PHPStan\Type\ThisType;
@ -44,10 +45,10 @@ final class UnitializedPropertyAnalyzer
}
public function isUnitialized(Expr $expr) : bool
{
if (!$expr instanceof PropertyFetch) {
if (!$expr instanceof PropertyFetch && !$expr instanceof StaticPropertyFetch) {
return \false;
}
$varType = $this->nodeTypeResolver->getType($expr->var);
$varType = $expr instanceof PropertyFetch ? $this->nodeTypeResolver->getType($expr->var) : $this->nodeTypeResolver->getType($expr->class);
if ($varType instanceof ThisType) {
$varType = $varType->getStaticObjectType();
}

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'f85e8c27b3932196d882c70b063f517a48b5aaac';
public const PACKAGE_VERSION = '1f9829d2a3820f39fe0601b996c5cba71ffb42b0';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-01-03 14:06:43';
public const RELEASE_DATE = '2024-01-04 22:47:15';
/**
* @var int
*/