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 12
12
13
13
namespace MichaelRubel \ValueObjects \Collection \Primitive ;
14
14
15
- use Illuminate \Support \Stringable ;
15
+ use Illuminate \Support \Str ;
16
16
use InvalidArgumentException ;
17
17
use MichaelRubel \ValueObjects \ValueObject ;
18
18
@@ -83,11 +83,9 @@ public function value(): bool
83
83
*/
84
84
protected function handleNonBoolean (int |string $ value ): void
85
85
{
86
- $ string = new Stringable ($ value );
87
-
88
86
$ 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 ,
91
89
default => throw new InvalidArgumentException ('Invalid boolean. ' ),
92
90
};
93
91
}
You can’t perform that action at this time.
0 commit comments