File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -710,15 +710,16 @@ private function getNodeKey(Expr $node): string
710
710
{
711
711
$ key = $ this ->exprPrinter ->printExpr ($ node );
712
712
713
+ $ attributes = $ node ->getAttributes ();
713
714
if (
714
715
$ node instanceof Node \FunctionLike
715
- && $ node -> hasAttribute ( ArrayMapArgVisitor::ATTRIBUTE_NAME )
716
- && $ node -> hasAttribute ( 'startFilePos ' )
716
+ && (( $ attributes [ ArrayMapArgVisitor::ATTRIBUTE_NAME ] ?? null ) !== null )
717
+ && (( $ attributes [ 'startFilePos ' ] ?? null ) !== null )
717
718
) {
718
- $ key .= '/* ' . $ node -> getAttribute ( 'startFilePos ' ) . '*/ ' ;
719
+ $ key .= '/* ' . $ attributes [ 'startFilePos ' ] . '*/ ' ;
719
720
}
720
721
721
- if ($ node -> getAttribute ( self ::KEEP_VOID_ATTRIBUTE_NAME ) === true ) {
722
+ if (( $ attributes [ self ::KEEP_VOID_ATTRIBUTE_NAME ] ?? null ) === true ) {
722
723
$ key .= '/* ' . self ::KEEP_VOID_ATTRIBUTE_NAME . '*/ ' ;
723
724
}
724
725
You can’t perform that action at this time.
0 commit comments