File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,17 @@ class Button extends Component
12
12
*
13
13
* @param $text
14
14
*/
15
- public function __construct ($ text = false )
15
+ public function __construct (? string $ text = null )
16
16
{
17
- if ($ text ) {
18
- $ this ->options ['text ' ] = $ text ;
19
- }
17
+ $ this ->options ['text ' ] = $ text ;
20
18
}
21
19
22
20
/**
23
21
* @param $text
24
22
*
25
23
* @return self
26
24
*/
27
- public static function make ($ text ): self
25
+ public static function make (? string $ text = null ): self
28
26
{
29
27
return new static ($ text );
30
28
}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function __construct($text = false)
24
24
*
25
25
* @return self
26
26
*/
27
- public static function make ($ text ): self
27
+ public static function make (? string $ text = null ): self
28
28
{
29
29
return new static ($ text );
30
30
}
You can’t perform that action at this time.
0 commit comments