File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ private function extractTagsAndArguments(array $lines) : array
9898 foreach ($ lines as $ line ) {
9999 if ($ currentState === $ stateSearchStartOfTag ) {
100100 // pattern: ^@<name-of-tag><optional: space plus rest of line>
101- $ pattern = '(^@([a-z-]+)( (.*))?$) ' ;
101+ $ pattern = '(^@([a-z: -]+)( (.*))?$) ' ;
102102 $ count = preg_match ($ pattern , $ line , $ matches );
103103 if (1 !== $ count ) {
104104 continue ;
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ public function it_parses_single_line_annotations_of_a_doc_block()
9090 * @some-tag some argument string for the first some-tag
9191 * @some-tag some other argument string for the second some-tag
9292 * @othertag some argument string for another tag
93+ * @namespaced:tag some argument
9394 */
9495DocBlock ;
9596
@@ -113,6 +114,11 @@ public function it_parses_single_line_annotations_of_a_doc_block()
113114 'some argument string for another tag ' ,
114115 Annotations::CONTEXT_CLASS
115116 );
117+ $ expectedAnnotations ->add (
118+ 'namespaced:tag ' ,
119+ 'some argument ' ,
120+ Annotations::CONTEXT_CLASS
121+ );
116122
117123 $ this ->assertEquals ($ expectedAnnotations , $ annotations );
118124 }
You can’t perform that action at this time.
0 commit comments