From 371745b49101cba49c711555d5f5e99d3a0b5f49 Mon Sep 17 00:00:00 2001 From: Smoren Date: Tue, 12 Mar 2024 15:20:18 +0300 Subject: [PATCH] Stan fixes. --- src/Structs/Slice.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Structs/Slice.php b/src/Structs/Slice.php index eff1cca..38d79ce 100644 --- a/src/Structs/Slice.php +++ b/src/Structs/Slice.php @@ -33,6 +33,7 @@ class Slice */ public static function toSlice($s): Slice { + /** @var mixed $s */ if ($s instanceof Slice) { return $s; } @@ -42,6 +43,7 @@ public static function toSlice($s): Slice throw new ValueError("Invalid slice: \"{$str}\"."); } + /** @var string $s */ $slice = self::parseSliceString($s); return new Slice(...$slice); @@ -92,7 +94,7 @@ public static function isSliceArray($s): bool return false; } - if (!(\count($s) >= 0 && \count($s) <= 3)) { + if (\count($s) > 3) { return false; }