Skip to content
Snippets Groups Projects
Commit 3037689c authored by Tibo's avatar Tibo
Browse files

status : max of empty array is unknown

parent 64200c49
No related branches found
No related tags found
No related merge requests found
Pipeline #12874 passed
......@@ -73,6 +73,10 @@ class Status
*/
public static function max(array $items) : Status
{
if (count($items) == 0) {
return Status::unknown();
}
return max(array_map(
function (HasStatus $item) {
return $item->status();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment