Skip to content

Commit 371745b

Browse files
committed
Stan fixes.
1 parent 65271f8 commit 371745b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Structs/Slice.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class Slice
3333
*/
3434
public static function toSlice($s): Slice
3535
{
36+
/** @var mixed $s */
3637
if ($s instanceof Slice) {
3738
return $s;
3839
}
@@ -42,6 +43,7 @@ public static function toSlice($s): Slice
4243
throw new ValueError("Invalid slice: \"{$str}\".");
4344
}
4445

46+
/** @var string $s */
4547
$slice = self::parseSliceString($s);
4648

4749
return new Slice(...$slice);
@@ -92,7 +94,7 @@ public static function isSliceArray($s): bool
9294
return false;
9395
}
9496

95-
if (!(\count($s) >= 0 && \count($s) <= 3)) {
97+
if (\count($s) > 3) {
9698
return false;
9799
}
98100

0 commit comments

Comments
 (0)