From 83af1969ba1e07e9616c9227cf65eddd7a93275a Mon Sep 17 00:00:00 2001 From: Smoren Date: Tue, 12 Mar 2024 18:03:47 +0300 Subject: [PATCH] Fixes. --- src/Structs/Slice.php | 2 +- tests/unit/Structs/SliceTest.php | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Structs/Slice.php b/src/Structs/Slice.php index 702b822..3d9cd2a 100644 --- a/src/Structs/Slice.php +++ b/src/Structs/Slice.php @@ -60,7 +60,7 @@ public static function toSlice($s): Slice */ public static function isSlice($s): bool { - return ($s instanceof Slice) || static::isSliceString($s); + return ($s instanceof Slice) || static::isSliceString($s) || static::isSliceArray($s); } /** diff --git a/tests/unit/Structs/SliceTest.php b/tests/unit/Structs/SliceTest.php index cfe80dd..3ad7ed7 100644 --- a/tests/unit/Structs/SliceTest.php +++ b/tests/unit/Structs/SliceTest.php @@ -136,9 +136,6 @@ public function dataProviderForFalse(): array [true], [false], [null], - [[]], - [[1, 2, 3]], - [[null]], [new \ArrayObject([])], [['a' => 1]], ];