diff --git a/tests/Material/Queue.php b/tests/Material/Queue.php index 1f1e033bdd3b97e211cef619cafddd24451bff1c..5adc60ef683b33a261b66bcac1cb8658ebf01e96 100644 --- a/tests/Material/Queue.php +++ b/tests/Material/Queue.php @@ -18,7 +18,7 @@ class Queue public static function push(string $name, $value): int { - if (!is_array(self::$data[$name])) { + if (!is_array(self::$data[$name] ?? null)) { self::$data[$name] = []; } return array_push(self::$data[$name], $value); @@ -26,7 +26,7 @@ class Queue public static function shift(string $name) { - if (!is_array(self::$data[$name])) { + if (!is_array(self::$data[$name] ?? null)) { return null; } return array_shift(self::$data[$name]);