mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-20 07:22:43 +02:00
Updated Rector to commit 1f9829d2a3820f39fe0601b996c5cba71ffb42b0
1f9829d2a3
[Strict] Add StaticProperty supporton may be unitialized static property on DisallowedEmptyRuleFixerRector (#5428)
This commit is contained in:
parent
da887b253b
commit
5457aea4e0
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user