99use PHPStan \Broker \AnonymousClassNameHelper ;
1010use PHPStan \File \FileHelper ;
1111use PHPStan \Parser \Parser ;
12- use PHPStan \Parser \PropertyHookNameVisitor ;
1312use PHPStan \PhpDoc \PhpDocNodeResolver ;
1413use PHPStan \PhpDoc \PhpDocStringResolver ;
1514use PHPStan \PhpDoc \ResolvedPhpDocBlock ;
@@ -281,7 +280,7 @@ function (Node $node) use ($fileName, $lookForTrait, &$traitFound, $traitMethodA
281280 } elseif ($ node instanceof Node \Stmt \Function_) {
282281 $ functionStack [] = ltrim (sprintf ('%s \\%s ' , $ namespace , $ node ->name ->name ), '\\' );
283282 } elseif ($ node instanceof Node \PropertyHook) {
284- $ propertyName = $ node ->getAttribute (PropertyHookNameVisitor:: ATTRIBUTE_NAME );
283+ $ propertyName = $ node ->getAttribute (' propertyName ' );
285284 if ($ propertyName !== null ) {
286285 $ functionStack [] = sprintf ('$%s::%s ' , $ propertyName , $ node ->name ->toString ());
287286 }
@@ -299,7 +298,7 @@ function (Node $node) use ($fileName, $lookForTrait, &$traitFound, $traitMethodA
299298
300299 return null ;
301300 } elseif ($ node instanceof Node \PropertyHook) {
302- $ propertyName = $ node ->getAttribute (PropertyHookNameVisitor:: ATTRIBUTE_NAME );
301+ $ propertyName = $ node ->getAttribute (' propertyName ' );
303302 if ($ propertyName !== null ) {
304303 $ docComment = GetLastDocComment::forNode ($ node );
305304 if ($ docComment !== null ) {
@@ -394,7 +393,7 @@ static function (Node $node) use (&$namespace, &$functionStack, &$classStack): v
394393
395394 array_pop ($ functionStack );
396395 } elseif ($ node instanceof Node \PropertyHook) {
397- $ propertyName = $ node ->getAttribute (PropertyHookNameVisitor:: ATTRIBUTE_NAME );
396+ $ propertyName = $ node ->getAttribute (' propertyName ' );
398397 if ($ propertyName !== null ) {
399398 if (count ($ functionStack ) === 0 ) {
400399 throw new ShouldNotHappenException ();
@@ -503,7 +502,7 @@ function (Node $node) use ($fileName, $lookForTrait, $phpDocNodeMap, &$traitFoun
503502 } elseif ($ node instanceof Node \Stmt \Function_) {
504503 $ functionStack [] = ltrim (sprintf ('%s \\%s ' , $ namespace , $ node ->name ->name ), '\\' );
505504 } elseif ($ node instanceof Node \PropertyHook) {
506- $ propertyName = $ node ->getAttribute (PropertyHookNameVisitor:: ATTRIBUTE_NAME );
505+ $ propertyName = $ node ->getAttribute (' propertyName ' );
507506 if ($ propertyName !== null ) {
508507 $ functionStack [] = sprintf ('$%s::%s ' , $ propertyName , $ node ->name ->toString ());
509508 }
@@ -742,7 +741,7 @@ static function (Node $node, $callbackResult) use (&$namespace, &$functionStack,
742741
743742 array_pop ($ functionStack );
744743 } elseif ($ node instanceof Node \PropertyHook) {
745- $ propertyName = $ node ->getAttribute (PropertyHookNameVisitor:: ATTRIBUTE_NAME );
744+ $ propertyName = $ node ->getAttribute (' propertyName ' );
746745 if ($ propertyName !== null ) {
747746 if (count ($ functionStack ) === 0 ) {
748747 throw new ShouldNotHappenException ();
0 commit comments