@@ -181,7 +181,8 @@ public function process(
181181 }
182182
183183 $ errors [] = (new Error (sprintf (
184- 'Ignored error pattern %s is expected to occur %d %s, but occurred %d %s. ' ,
184+ '%s %s is expected to occur %d %s, but occurred %d %s. ' ,
185+ IgnoredError::getIgnoredErrorLabel ($ unmatchedIgnoredError ),
185186 IgnoredError::stringifyPattern ($ unmatchedIgnoredError ),
186187 $ unmatchedIgnoredError ['count ' ],
187188 $ unmatchedIgnoredError ['count ' ] === 1 ? 'time ' : 'times ' ,
@@ -205,7 +206,8 @@ public function process(
205206 ) {
206207 if ($ unmatchedIgnoredError ['realCount ' ] < $ unmatchedIgnoredError ['count ' ]) {
207208 $ errors [] = (new Error (sprintf (
208- 'Ignored error pattern %s is expected to occur %d %s, but occurred only %d %s. ' ,
209+ '%s %s is expected to occur %d %s, but occurred only %d %s. ' ,
210+ IgnoredError::getIgnoredErrorLabel ($ unmatchedIgnoredError ),
209211 IgnoredError::stringifyPattern ($ unmatchedIgnoredError ),
210212 $ unmatchedIgnoredError ['count ' ],
211213 $ unmatchedIgnoredError ['count ' ] === 1 ? 'time ' : 'times ' ,
@@ -224,15 +226,17 @@ public function process(
224226
225227 $ errors [] = (new Error (
226228 sprintf (
227- 'Ignored error pattern %s was not matched in reported errors. ' ,
229+ '%s %s was not matched in reported errors. ' ,
230+ IgnoredError::getIgnoredErrorLabel ($ unmatchedIgnoredError ),
228231 IgnoredError::stringifyPattern ($ unmatchedIgnoredError ),
229232 ),
230233 $ unmatchedIgnoredError ['realPath ' ],
231234 canBeIgnored: false ,
232235 ))->withIdentifier ('ignore.unmatched ' );
233236 } elseif (!$ onlyFiles ) {
234237 $ stringErrors [] = sprintf (
235- 'Ignored error pattern %s was not matched in reported errors. ' ,
238+ '%s %s was not matched in reported errors. ' ,
239+ IgnoredError::getIgnoredErrorLabel ($ unmatchedIgnoredError ),
236240 IgnoredError::stringifyPattern ($ unmatchedIgnoredError ),
237241 );
238242 }
0 commit comments