Skip to content

Commit d8081f6

Browse files
committed
Merge branch 'jyrkidn-feature/psalm-improvements' into develop
2 parents e88fd6b + 3d3e2f5 commit d8081f6

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

src/TableComponent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ public function setTranslationStrings()
7575
}
7676

7777
/**
78-
* @return mixed
78+
* @return \Illuminate\Database\Eloquent\Builder
7979
*/
8080
abstract public function query(): Builder;
8181

8282
/**
83-
* @return mixed
83+
* @return array
8484
*/
8585
abstract public function columns(): array;
8686

src/Views/Button.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@ class Button extends Component
1212
*
1313
* @param $text
1414
*/
15-
public function __construct($text = false)
15+
public function __construct(?string $text = null)
1616
{
17-
if ($text) {
18-
$this->options['text'] = $text;
19-
}
17+
$this->options['text'] = $text;
2018
}
2119

2220
/**
2321
* @param $text
2422
*
2523
* @return self
2624
*/
27-
public static function make($text): self
25+
public static function make(?string $text = null): self
2826
{
2927
return new static($text);
3028
}

src/Views/Column.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ public function __get($property)
9494
}
9595

9696
/**
97-
* @param null $text
98-
* @param null $attribute
97+
* @param string $text
98+
* @param string $attribute
9999
*
100100
* @return static
101101
*/
102-
public static function make($text = null, $attribute = null)
102+
public static function make($text, $attribute = null)
103103
{
104104
return new static($text, $attribute);
105105
}

src/Views/Link.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function __construct($text = false)
2424
*
2525
* @return self
2626
*/
27-
public static function make($text): self
27+
public static function make(?string $text = null): self
2828
{
2929
return new static($text);
3030
}

0 commit comments

Comments
 (0)