File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -205,12 +205,24 @@ public function analyseFile(
205205
206206 if ($ this ->reportUnmatchedIgnoredErrors ) {
207207 foreach (array_keys ($ unmatchedLineIgnores ) as $ line ) {
208+ $ traitFilePath = null ;
209+ if ($ scope ->isInTrait ()) {
210+ $ traitReflection = $ scope ->getTraitReflection ();
211+ if ($ traitReflection ->getFileName () !== false ) {
212+ $ traitFilePath = $ traitReflection ->getFileName ();
213+ }
214+ }
208215 $ fileErrors [] = new Error (
209216 sprintf ('No error to ignore is reported on line %d. ' , $ line ),
210217 $ scope ->getFileDescription (),
211218 $ line ,
212219 false ,
213- $ scope ->getFile ()
220+ $ scope ->getFile (),
221+ $ traitFilePath ,
222+ null ,
223+ null ,
224+ null ,
225+ 'ignoredError.unmatchedOnLine '
214226 );
215227 }
216228 }
You can’t perform that action at this time.
0 commit comments