We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 259c2bf commit f695262Copy full SHA for f695262
src/Utils/Iterables.php
@@ -233,6 +233,7 @@ public static function toIterator(iterable $iterable): \Iterator
233
$iterable instanceof \Iterator => $iterable,
234
$iterable instanceof \IteratorAggregate => self::toIterator($iterable->getIterator()),
235
is_array($iterable) => new \ArrayIterator($iterable),
236
+ default => throw new Nette\ShouldNotHappenException,
237
};
238
}
239
src/exceptions.php
@@ -104,3 +104,11 @@ class OutOfRangeException extends \OutOfRangeException
104
class UnexpectedValueException extends \UnexpectedValueException
105
{
106
107
+
108
109
+/**
110
+ * Houston, we have a problem.
111
+ */
112
+class ShouldNotHappenException extends \LogicException
113
+{
114
+}
0 commit comments