@@ -146,7 +146,7 @@ public function enterNode(Node $node)
146146 $ expr = $ node ->stmts [0 ]->expr ;
147147
148148 if ($ expr instanceof Node \Expr \StaticCall) {
149- $ model = $ expr ->class -> getAttribute ( ' resolvedName ' )-> name ;
149+ $ model = NodeUtil:: className ( $ expr ->class ) ;
150150 $ this ->data ['repositories ' ][$ class ]['model ' ] = $ model ;
151151 }
152152 }
@@ -173,7 +173,7 @@ public function enterNode(Node $node)
173173 if ($ expr instanceof Node \Expr \MethodCall && $ expr ->var instanceof Node \Expr \PropertyFetch && isset ($ this ->map [$ expr ->var ->name ->name ])) {
174174 $ this ->data ['searchers ' ][$ fqnClass ]['repository ' ] = $ this ->map [$ expr ->var ->name ->name ];
175175 } elseif ($ expr instanceof Node \Expr \MethodCall && $ expr ->var instanceof Node \Expr \StaticCall) {
176- $ model = $ expr ->var ->class -> getAttribute ( ' resolvedName ' )-> name ;
176+ $ model = NodeUtil:: className ( $ expr ->var ->class ) ;
177177 $ this ->data ['searchers ' ][$ fqnClass ]['model ' ] = $ model ;
178178 }
179179 }
@@ -271,7 +271,7 @@ public function leaveNode(Node $node)
271271 }
272272
273273 if ($ class === 'Flarum\Extend\Filter ' ) {
274- $ filterer = $ new ->args [0 ]->value ->class -> getAttribute ( ' resolvedName ' )-> name ;
274+ $ filterer = NodeUtil:: className ( $ new ->args [0 ]->value ->class ) ;
275275
276276 if ($ filterer === 'Flarum \\Discussion \\Filter \\DiscussionFilterer ' ) {
277277 $ searcher = 'Flarum \\Discussion \\Search \\DiscussionSearcher ' ;
@@ -297,7 +297,7 @@ public function leaveNode(Node $node)
297297 $ this ->data ['searchers ' ][$ searcher ]['mutators ' ][] = $ arg ->value ;
298298 }
299299 } elseif ($ class === 'Flarum\Extend\SimpleFlarumSearch ' ) {
300- $ searcher = $ new ->args [0 ]->value ->class -> getAttribute ( ' resolvedName ' )-> name ;
300+ $ searcher = NodeUtil:: className ( $ new ->args [0 ]->value ->class ) ;
301301
302302 $ arg = $ node ->args [0 ];
303303
0 commit comments