File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1212
1313namespace MichaelRubel \ValueObjects \Collection \Primitive ;
1414
15- use Illuminate \Support \Stringable ;
15+ use Illuminate \Support \Str ;
1616use InvalidArgumentException ;
1717use MichaelRubel \ValueObjects \ValueObject ;
1818
@@ -83,11 +83,9 @@ public function value(): bool
8383 */
8484 protected function handleNonBoolean (int |string $ value ): void
8585 {
86- $ string = new Stringable ($ value );
87-
8886 $ this ->value = match (true ) {
89- $ string -> contains ($ this ->trueValues , ignoreCase: true ) => true ,
90- $ string -> contains ($ this ->falseValues , ignoreCase: true ) => false ,
87+ Str:: contains ($ value , $ this ->trueValues , ignoreCase: true ) => true ,
88+ Str:: contains ($ value , $ this ->falseValues , ignoreCase: true ) => false ,
9189 default => throw new InvalidArgumentException ('Invalid boolean. ' ),
9290 };
9391 }
You can’t perform that action at this time.
0 commit comments