add tests batch 20
This commit is contained in:
@@ -26,7 +26,7 @@ class ExpenseStaffService
|
||||
if ($id <= 0 || in_array($roleName, $excludedRoles, true)) {
|
||||
continue;
|
||||
}
|
||||
if (! isset($staff[$id])) {
|
||||
if (!isset($staff[$id])) {
|
||||
$staff[$id] = [
|
||||
'id' => $id,
|
||||
'firstname' => $row['firstname'] ?? '',
|
||||
@@ -36,9 +36,8 @@ class ExpenseStaffService
|
||||
}
|
||||
|
||||
uasort($staff, static function ($a, $b) {
|
||||
$nameA = trim(($a['firstname'] ?? '').' '.($a['lastname'] ?? ''));
|
||||
$nameB = trim(($b['firstname'] ?? '').' '.($b['lastname'] ?? ''));
|
||||
|
||||
$nameA = trim(($a['firstname'] ?? '') . ' ' . ($a['lastname'] ?? ''));
|
||||
$nameB = trim(($b['firstname'] ?? '') . ' ' . ($b['lastname'] ?? ''));
|
||||
return strcasecmp($nameA, $nameB);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user