File manager - Edit - /var/www/payraty/helpdesk/vendor/rector/rector/vendor/rector/rector-doctrine/src/PhpDocParser/DoctrineClassAnnotationMatcher.php
Back
<?php declare (strict_types=1); namespace Rector\Doctrine\PhpDocParser; use PhpParser\Node; use Rector\BetterPhpDocParser\PhpDocParser\ClassAnnotationMatcher; class DoctrineClassAnnotationMatcher { /** * @readonly * @var \Rector\BetterPhpDocParser\PhpDocParser\ClassAnnotationMatcher */ private $classAnnotationMatcher; public function __construct(ClassAnnotationMatcher $classAnnotationMatcher) { $this->classAnnotationMatcher = $classAnnotationMatcher; } public function resolveExpectingDoctrineFQCN(string $value, Node $node) : ?string { $fullyQualified = $this->classAnnotationMatcher->resolveTagToKnownFullyQualifiedName($value, $node); if ($fullyQualified === null) { // Doctrine FQCNs are strange: In their examples // they omit the leading slash. This leads to // ClassAnnotationMatcher searching in the wrong // namespace. Therefor we try to add the leading // slash manually here. $fullyQualified = $this->classAnnotationMatcher->resolveTagToKnownFullyQualifiedName('\\' . $value, $node); } return $fullyQualified; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings