File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ d521d82e9b14a5f411f3492529800c6b39f17740
15
15
11b88b5f8641574fc93d2a4f443aeaf819381c91
16
16
f74b50a0c5a93e2042dd0899f67dc0d77d9f37b2
17
17
9e90f1089ce7ad5f2e9e3396c5764687690c96bb
18
+ 68d26b0bcc009757d3a8c4b4aca534522832a35b
Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ public static function guid(): string
40
40
return Str::uuid ()->toString ();
41
41
}
42
42
43
+ public static function empty (): string
44
+ {
45
+ return '' ;
46
+ }
47
+
43
48
public static function toString (mixed $ value ): string
44
49
{
45
50
return (string ) $ value ;
Original file line number Diff line number Diff line change 25
25
->and (is_string ($ result ))->toBeTrue ();
26
26
});
27
27
28
+ test ('empty method returns an empty string ' , function () {
29
+ $ value = 123 ;
30
+
31
+ $ result = Str::empty ();
32
+
33
+ expect ($ result )->toEqual ('' );
34
+ });
35
+
28
36
test ('maxLength method limits the length of a string ' , function () {
29
37
$ value = 'Hello World ' ;
30
38
You can’t perform that action at this time.
0 commit comments