File manager - Edit - /var/www/html/transparencia/vendor/phpdocumentor/reflection/tests/integration/Metadata/HookStrategy.php
Back
<?php declare(strict_types=1); namespace phpDocumentor\Reflection\Metadata; use phpDocumentor\Reflection\Php\Factory\ContextStack; use phpDocumentor\Reflection\Php\ProjectFactoryStrategy; use phpDocumentor\Reflection\Php\StrategyContainer; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Stmt\Expression; final class HookStrategy implements ProjectFactoryStrategy { public function matches(ContextStack $context, object $object): bool { if ($object instanceof Expression === false) { return false; } return $object->expr instanceof FuncCall && ((string)$object->expr->name) === 'hook'; } public function create(ContextStack $context, object $object, StrategyContainer $strategies): void { $method = $context->peek(); $method->addMetadata(new Hook($object->expr->args[0]->value->value)); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings