fix gitlab tests
This commit is contained in:
@@ -78,7 +78,7 @@ class BadgeTextFormatter
|
||||
}
|
||||
|
||||
$special = [
|
||||
'of' => 'of',
|
||||
'of' => 'of',
|
||||
'head' => 'Head',
|
||||
];
|
||||
|
||||
@@ -95,7 +95,6 @@ class BadgeTextFormatter
|
||||
|
||||
if ($start === false) {
|
||||
$out[] = ucfirst(mb_strtolower($tok, 'UTF-8'));
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -111,12 +110,12 @@ class BadgeTextFormatter
|
||||
$coreFmt = preg_replace_callback(
|
||||
'/\p{L}+/u',
|
||||
static fn ($m) => mb_strtoupper(mb_substr($m[0], 0, 1, 'UTF-8'), 'UTF-8')
|
||||
.mb_strtolower(mb_substr($m[0], 1, null, 'UTF-8'), 'UTF-8'),
|
||||
. mb_strtolower(mb_substr($m[0], 1, null, 'UTF-8'), 'UTF-8'),
|
||||
mb_strtolower($core, 'UTF-8')
|
||||
);
|
||||
}
|
||||
|
||||
$out[] = $pre.$coreFmt.$suf;
|
||||
$out[] = $pre . $coreFmt . $suf;
|
||||
}
|
||||
|
||||
return implode(' ', $out);
|
||||
@@ -164,7 +163,7 @@ class BadgeTextFormatter
|
||||
'role',
|
||||
'active_role',
|
||||
'role_name',
|
||||
fn ($r) => ! empty($r['roles'])
|
||||
fn ($r) => !empty($r['roles'])
|
||||
? (array_values(array_filter(array_map('trim', explode(',', (string) $r['roles']))))[0] ?? '')
|
||||
: '',
|
||||
'job_title',
|
||||
@@ -182,7 +181,7 @@ class BadgeTextFormatter
|
||||
return $this->norm($v);
|
||||
}
|
||||
} else {
|
||||
if (! empty($info[$key])) {
|
||||
if (!empty($info[$key])) {
|
||||
$v = $this->norm((string) $info[$key]);
|
||||
if ($v !== '') {
|
||||
return $v;
|
||||
@@ -197,7 +196,7 @@ class BadgeTextFormatter
|
||||
public function firstExisting(array $paths): ?string
|
||||
{
|
||||
foreach ($paths as $path) {
|
||||
if (! empty($path) && file_exists($path)) {
|
||||
if (!empty($path) && file_exists($path)) {
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user