@@ -286,7 +286,7 @@ function (ObjectDescription $object) use ($methods, &$state): bool {
286
286
$ methods === []
287
287
? 'not to have public methods '
288
288
: sprintf ("not to have public methods besides '%s' " , implode ("', ' " , $ methods )),
289
- FileLineFinder::where (fn (string $ line ): bool => str_contains ($ line , $ state ->contains )),
289
+ FileLineFinder::where (fn (string $ line ): bool => str_contains ($ line , ( string ) $ state ->contains )),
290
290
);
291
291
}
292
292
@@ -329,7 +329,7 @@ function (ObjectDescription $object) use ($methods, &$state): bool {
329
329
$ methods === []
330
330
? 'not to have protected methods '
331
331
: sprintf ("not to have protected methods besides '%s' " , implode ("', ' " , $ methods )),
332
- FileLineFinder::where (fn (string $ line ): bool => str_contains ($ line , $ state ->contains )),
332
+ FileLineFinder::where (fn (string $ line ): bool => str_contains ($ line , ( string ) $ state ->contains )),
333
333
);
334
334
}
335
335
@@ -372,7 +372,7 @@ function (ObjectDescription $object) use ($methods, &$state): bool {
372
372
$ methods === []
373
373
? 'not to have private methods '
374
374
: sprintf ("not to have private methods besides '%s' " , implode ("', ' " , $ methods )),
375
- FileLineFinder::where (fn (string $ line ): bool => str_contains ($ line , $ state ->contains )),
375
+ FileLineFinder::where (fn (string $ line ): bool => str_contains ($ line , ( string ) $ state ->contains )),
376
376
);
377
377
}
378
378
0 commit comments