?????????? ????????? - ??????????????? - /opt/cpanel/ea-wappspector/vendor/rector/rector/rules/TypeDeclaration/Matcher/PropertyAssignMatcher.php
???????
<?php declare (strict_types=1); namespace Rector\TypeDeclaration\Matcher; use PhpParser\Node\Expr; use PhpParser\Node\Expr\ArrayDimFetch; use PhpParser\Node\Expr\Assign; use Rector\NodeAnalyzer\PropertyFetchAnalyzer; final class PropertyAssignMatcher { /** * @readonly * @var \Rector\NodeAnalyzer\PropertyFetchAnalyzer */ private $propertyFetchAnalyzer; public function __construct(PropertyFetchAnalyzer $propertyFetchAnalyzer) { $this->propertyFetchAnalyzer = $propertyFetchAnalyzer; } /** * Covers: * - $this->propertyName = $expr; * - $this->propertyName[] = $expr; */ public function matchPropertyAssignExpr(Assign $assign, string $propertyName) : ?Expr { $assignVar = $assign->var; if ($this->propertyFetchAnalyzer->isLocalPropertyFetchName($assignVar, $propertyName)) { return $assign->expr; } if (!$assignVar instanceof ArrayDimFetch) { return null; } if ($this->propertyFetchAnalyzer->isLocalPropertyFetchName($assignVar->var, $propertyName)) { return $assign->expr; } return null; } }
| ver. 1.6 |
Github
|
.
| PHP 8.2.30 | ??????????? ?????????: 0 |
proxy
|
phpinfo
|
???????????