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 @@ -107,3 +107,11 @@ class OutOfRangeException extends \OutOfRangeException
107107class UnexpectedValueException extends \UnexpectedValueException
108108{
109109}
110+
111+
112+ /**
113+ * Houston, we have a problem.
114+ */
115+ class ShouldNotHappenException extends \LogicException
116+ {
117+ }
You can’t perform that action at this time.
0 commit comments