Skip to content

Commit ae34672

Browse files
authored
Tweak Return Types (rappasoft#2205)
* Tweak Return Types * Tweak type
1 parent b14f456 commit ae34672

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/DataTransferObjects/Filters/FilterPillData.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getCustomResetButtonAttributes(): array
5858

5959
public function getIsAnExternalLivewireFilter(): int
6060
{
61-
return intval($this->isAnExternalLivewireFilter ?? false);
61+
return intval($this->isAnExternalLivewireFilter ?? 0);
6262
}
6363

6464
public function getSeparator(): string
@@ -68,17 +68,17 @@ public function getSeparator(): string
6868

6969
public function shouldUsePillsAsHtml(): int
7070
{
71-
return intval($this->renderPillsAsHtml ?? false);
71+
return intval($this->renderPillsAsHtml ?? 0);
7272
}
7373

7474
public function shouldUsePillsTitleAsHtml(): int
7575
{
76-
return intval($this->renderPillsTitleAsHtml ?? false);
76+
return intval($this->renderPillsTitleAsHtml ?? 0);
7777
}
7878

7979
public function shouldWatchForEvents(): int
8080
{
81-
return intval($this->watchForEvents ?? false);
81+
return intval($this->watchForEvents ?? 0);
8282
}
8383

8484
public function isPillValueAnArray(): bool

src/View/Components/FilterPill.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class FilterPill extends Component
1111

1212
public function __construct(public string $filterKey, public FilterPillData $filterPillData)
1313
{
14-
$this->shouldWatch = $this->filterPillData->shouldWatchForEvents() ?? 0;
14+
$this->shouldWatch = (bool) $this->filterPillData->shouldWatchForEvents();
1515
}
1616

1717
public function render(): null|string|\Illuminate\Support\HtmlString|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View

0 commit comments

Comments
 (0)