File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ public static function toIterator(iterable $iterable): \Iterator
233233 $ iterable instanceof \Iterator => $ iterable ,
234234 $ iterable instanceof \IteratorAggregate => self ::toIterator ($ iterable ->getIterator ()),
235235 is_array ($ iterable ) => new \ArrayIterator ($ iterable ),
236+ default => throw new Nette \ShouldNotHappenException ,
236237 };
237238 }
238239}
Original file line number Diff line number Diff line change @@ -104,3 +104,11 @@ class OutOfRangeException extends \OutOfRangeException
104104class UnexpectedValueException extends \UnexpectedValueException
105105{
106106}
107+
108+
109+ /**
110+ * Houston, we have a problem.
111+ */
112+ class ShouldNotHappenException extends \LogicException
113+ {
114+ }
You can’t perform that action at this time.
0 commit comments