mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Update src/Repositories/DatasetsRepository.php
Co-authored-by: Luke Downing <lukeraymonddowning@gmail.com>
This commit is contained in:
@ -155,7 +155,10 @@ final class DatasetsRepository
|
||||
return true;
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
|
||||
$closestScopeDatasetKey = array_reduce(array_keys($matchingDatasets), function ($keyA, $keyB) {
|
||||
$closestScopeDatasetKey = array_reduce(
|
||||
array_keys($matchingDatasets),
|
||||
fn ($keyA, $keyB) => $keyA !== null && strlen($keyA) > strlen($keyB) ? $keyA : $keyB
|
||||
);
|
||||
if ($keyA === null) {
|
||||
return $keyB;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user