@@ -37,7 +37,7 @@ public function filter(Closure $callback): self
37
37
return $ this ;
38
38
}
39
39
40
- public function get (string $ attribute = null )
40
+ public function get (? string $ attribute = null )
41
41
{
42
42
$ node = $ this ->node ();
43
43
@@ -48,7 +48,7 @@ public function get(string $attribute = null)
48
48
return $ attribute ? self ::getAttribute ($ node , $ attribute ) : $ node ->nodeValue ;
49
49
}
50
50
51
- public function getAll (string $ attribute = null ): array
51
+ public function getAll (? string $ attribute = null ): array
52
52
{
53
53
$ nodes = $ this ->nodes ();
54
54
@@ -60,26 +60,26 @@ public function getAll(string $attribute = null): array
60
60
);
61
61
}
62
62
63
- public function str (string $ attribute = null ): ?string
63
+ public function str (? string $ attribute = null ): ?string
64
64
{
65
65
$ value = $ this ->get ($ attribute );
66
66
67
67
return $ value ? clean ($ value ) : null ;
68
68
}
69
69
70
- public function strAll (string $ attribute = null ): array
70
+ public function strAll (? string $ attribute = null ): array
71
71
{
72
72
return array_filter (array_map (fn ($ value ) => clean ($ value ), $ this ->getAll ($ attribute )));
73
73
}
74
74
75
- public function int (string $ attribute = null ): ?int
75
+ public function int (? string $ attribute = null ): ?int
76
76
{
77
77
$ value = $ this ->get ($ attribute );
78
78
79
79
return $ value ? (int ) $ value : null ;
80
80
}
81
81
82
- public function url (string $ attribute = null ): ?UriInterface
82
+ public function url (? string $ attribute = null ): ?UriInterface
83
83
{
84
84
$ value = $ this ->get ($ attribute );
85
85
0 commit comments