?????????? ????????? - ??????????????? - /opt/cpanel/ea-wappspector/vendor/rector/rector/rules/DeadCode/PhpDoc/Guard/StandaloneTypeRemovalGuard.php
???????
<?php declare (strict_types=1); namespace Rector\DeadCode\PhpDoc\Guard; use PhpParser\Node; use PhpParser\Node\Identifier; use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; use PHPStan\PhpDocParser\Ast\Type\TypeNode; final class StandaloneTypeRemovalGuard { /** * @var string[] */ private const ALLOWED_TYPES = ['false', 'true']; public function isLegal(TypeNode $typeNode, Node $node) : bool { if (!$typeNode instanceof IdentifierTypeNode) { return \true; } if (!$node instanceof Identifier) { return \true; } if ($node->toString() !== 'bool') { return \true; } return !\in_array($typeNode->name, self::ALLOWED_TYPES, \true); } }
| ver. 1.6 |
Github
|
.
| PHP 8.2.30 | ??????????? ?????????: 0.01 |
proxy
|
phpinfo
|
???????????