@@ -397,6 +397,39 @@ public function testUpdateMethodParametersFromInvalidTags(): void
397397 [
398398 'The "param2" parameter of the method "fun1" is missing a @param tag ' ,
399399 'The method "fun1" has "6" @param tags but only "2" where expected. ' ,
400+ 'The method "fun1" has "1" invalid @param tags. ' ,
401+ 'Invalid @param tag on "fun1": "array[\Illuminate\Notifications\Channels\Notification] $notification" ' ,
402+ ],
403+ $ this ->callMethod ($ visitor , 'updateMethodParametersFromTags ' , [
404+ $ function ,
405+ $ docBlockNode ->getTag ('param ' )
406+ ])
407+ );
408+ }
409+
410+ /**
411+ * @see NodeVisitor::updateMethodParametersFromTags
412+ */
413+ public function testUpdateMethodParametersFromInvalidTagsReport (): void
414+ {
415+ $ docBlockParser = new DocBlockParser ();
416+ $ docBlockNode = $ docBlockParser ->parse (
417+ '/** ' . "\n"
418+ . '* @param array[\Illuminate\Notifications\Channels\Notification] $notification ' . "\n"
419+ . '**/ ' . "\n"
420+ );
421+ $ parserContext = new ParserContext (new TrueFilter (), new DocBlockParser (), new Standard ());
422+ $ visitor = new NodeVisitor ($ parserContext );
423+ $ function = new FunctionReflection ('fun1 ' , 0 );
424+
425+ $ param1 = (new ParameterReflection ('notification ' , 0 ));
426+ $ function ->addParameter ($ param1 );
427+
428+ $ this ->assertSame (
429+ [
430+ 'The "notification" parameter of the method "fun1" is missing a @param tag ' ,
431+ 'The method "fun1" has "1" invalid @param tags. ' ,
432+ 'Invalid @param tag on "fun1": "array[\Illuminate\Notifications\Channels\Notification] $notification" ' ,
400433 ],
401434 $ this ->callMethod ($ visitor , 'updateMethodParametersFromTags ' , [
402435 $ function ,
0 commit comments