There was an error while loading. Please reload this page.
1 parent 65271f8 commit 371745bCopy full SHA for 371745b
src/Structs/Slice.php
@@ -33,6 +33,7 @@ class Slice
33
*/
34
public static function toSlice($s): Slice
35
{
36
+ /** @var mixed $s */
37
if ($s instanceof Slice) {
38
return $s;
39
}
@@ -42,6 +43,7 @@ public static function toSlice($s): Slice
42
43
throw new ValueError("Invalid slice: \"{$str}\".");
44
45
46
+ /** @var string $s */
47
$slice = self::parseSliceString($s);
48
49
return new Slice(...$slice);
@@ -92,7 +94,7 @@ public static function isSliceArray($s): bool
92
94
return false;
93
95
96
- if (!(\count($s) >= 0 && \count($s) <= 3)) {
97
+ if (\count($s) > 3) {
98
99
100
0 commit comments