refactor: PHP 8 features

This commit is contained in:
Nuno Maduro
2021-10-24 18:29:59 +01:00
parent e8c2fe6e35
commit 2b687a7269
43 changed files with 283 additions and 635 deletions

View File

@ -162,7 +162,7 @@ final class Coverage
$lastKey = count($array) - 1;
if (array_key_exists($lastKey, $array) && strpos($array[$lastKey], '..') !== false) {
if (array_key_exists($lastKey, $array) && str_contains($array[$lastKey], '..')) {
[$from] = explode('..', $array[$lastKey]);
$array[$lastKey] = $line > $from ? sprintf('%s..%s', $from, $line) : sprintf('%s..%s', $line, $from);