Skip to content

Commit

Permalink
Reduce ConstExprClassNameDecorator overhead (#4603)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Jul 25, 2023
1 parent 2951cc8 commit ba04cef
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public function __construct(

public function decorate(PhpDocNode $phpDocNode, PhpNode $phpNode): void
{
// iterating all phpdocs has big overhead. peek into the phpdoc to exit early
if (str_contains($phpDocNode->__toString(), '::') === false) {
return;
}

$this->phpDocNodeTraverser->traverseWithCallable($phpDocNode, '', function (Node $node) use (
$phpNode
): Node|null {
Expand Down

0 comments on commit ba04cef

Please sign in to comment.