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)
88
88
$ stackPtr
89
89
);
90
90
91
+ $ previousLine = -1 ;
91
92
if (false !== $ previousString ) {
92
- $ previousStringLine = $ tokens [$ previousString ]['line ' ];
93
+ $ previousLine = $ tokens [$ previousString ]['line ' ];
94
+ $ previousElement = $ previousString ;
95
+ }
96
+
97
+ if (false !== $ previousTag ) {
93
98
$ previousTagLine = $ tokens [$ previousTag ]['line ' ];
94
- $ previousLine = max ($ previousStringLine , $ previousTagLine );
95
99
100
+ if ($ previousTagLine > $ previousLine ) {
101
+ $ previousLine = $ previousTagLine ;
102
+ $ previousElement = $ previousTag ;
103
+ }
104
+ }
105
+
106
+ if ($ previousLine >= 0 ) {
96
107
$ currentIsCustom = !in_array ($ currentType , $ this ->tags );
97
108
$ previousIsCustom = ('' !== $ previousType )
98
109
&& !in_array ($ previousType , $ this ->tags );
@@ -121,7 +132,7 @@ public function process(File $phpcsFile, $stackPtr)
121
132
$ phpcsFile ->fixer ->beginChangeset ();
122
133
$ this ->removeLines (
123
134
$ phpcsFile ,
124
- $ previousString ,
135
+ $ previousElement ,
125
136
$ previousLine + 1 ,
126
137
$ commentTagLine - 1
127
138
);
@@ -161,7 +172,7 @@ public function process(File $phpcsFile, $stackPtr)
161
172
} else {
162
173
$ this ->removeLines (
163
174
$ phpcsFile ,
164
- $ previousString ,
175
+ $ previousElement ,
165
176
$ previousLine + 2 ,
166
177
$ commentTagLine - 1
167
178
);
Original file line number Diff line number Diff line change 61
61
*
62
62
* @param string $a
63
63
*/
64
+
65
+ /**
66
+ * @Route("/{id}/")
67
+ * @param
68
+ */
Original file line number Diff line number Diff line change 63
63
*
64
64
* @param string $a
65
65
*/
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()
32
32
20 => 1 ,
33
33
29 => 1 ,
34
34
33 => 1 ,
35
+ 67 => 1 ,
35
36
);
36
37
}
37
38
You can’t perform that action at this time.
0 commit comments