File tree Expand file tree Collapse file tree 4 files changed +27
-4
lines changed
Expand file tree Collapse file tree 4 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -88,11 +88,22 @@ public function process(File $phpcsFile, $stackPtr)
8888 $ stackPtr
8989 );
9090
91+ $ previousLine = -1 ;
9192 if (false !== $ previousString ) {
92- $ previousStringLine = $ tokens [$ previousString ]['line ' ];
93+ $ previousLine = $ tokens [$ previousString ]['line ' ];
94+ $ previousElement = $ previousString ;
95+ }
96+
97+ if (false !== $ previousTag ) {
9398 $ previousTagLine = $ tokens [$ previousTag ]['line ' ];
94- $ previousLine = max ($ previousStringLine , $ previousTagLine );
9599
100+ if ($ previousTagLine > $ previousLine ) {
101+ $ previousLine = $ previousTagLine ;
102+ $ previousElement = $ previousTag ;
103+ }
104+ }
105+
106+ if ($ previousLine >= 0 ) {
96107 $ currentIsCustom = !in_array ($ currentType , $ this ->tags );
97108 $ previousIsCustom = ('' !== $ previousType )
98109 && !in_array ($ previousType , $ this ->tags );
@@ -121,7 +132,7 @@ public function process(File $phpcsFile, $stackPtr)
121132 $ phpcsFile ->fixer ->beginChangeset ();
122133 $ this ->removeLines (
123134 $ phpcsFile ,
124- $ previousString ,
135+ $ previousElement ,
125136 $ previousLine + 1 ,
126137 $ commentTagLine - 1
127138 );
@@ -161,7 +172,7 @@ public function process(File $phpcsFile, $stackPtr)
161172 } else {
162173 $ this ->removeLines (
163174 $ phpcsFile ,
164- $ previousString ,
175+ $ previousElement ,
165176 $ previousLine + 2 ,
166177 $ commentTagLine - 1
167178 );
Original file line number Diff line number Diff line change 6161 *
6262 * @param string $a
6363 */
64+
65+ /**
66+ * @Route("/{id}/")
67+ * @param
68+ */
Original file line number Diff line number Diff line change 6363 *
6464 * @param string $a
6565 */
66+
67+ /**
68+ * @Route("/{id}/")
69+ *
70+ * @param
71+ */
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ public function getErrorList()
3232 20 => 1 ,
3333 29 => 1 ,
3434 33 => 1 ,
35+ 67 => 1 ,
3536 );
3637 }
3738
You can’t perform that action at this time.
0 commit comments