Skip to content

Commit ce62107

Browse files
committed
DocType fixes
1 parent cf82a20 commit ce62107

File tree

6 files changed

+48
-22
lines changed

6 files changed

+48
-22
lines changed

src/DataTransferObjects/Filters/FilterPillData.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ public function __construct(
1212
protected string $filterKey,
1313
protected string $filterPillTitle,
1414
protected string|array|null $filterPillValue,
15-
protected string $separator,
16-
public bool $isAnExternalLivewireFilter,
17-
public bool $hasCustomPillBlade,
18-
protected ?string $customPillBlade,
19-
protected array $filterPillsItemAttributes,
20-
protected bool $renderPillsAsHtml,
21-
protected bool $watchForEvents,
22-
protected array $customResetButtonAttributes,
23-
protected bool $renderPillsTitleAsHtml) {}
15+
protected string $separator = ',',
16+
public bool $isAnExternalLivewireFilter = false,
17+
public bool $hasCustomPillBlade = false,
18+
protected ?string $customPillBlade = null,
19+
protected array $filterPillsItemAttributes = [],
20+
protected bool $renderPillsAsHtml = false,
21+
protected bool $watchForEvents = false,
22+
protected array $customResetButtonAttributes = [],
23+
protected bool $renderPillsTitleAsHtml = false) {}
2424

2525
public static function make(string $filterKey, string $filterPillTitle, string|array|null $filterPillValue, string $separator = ', ', bool $isAnExternalLivewireFilter = false, bool $hasCustomPillBlade = false, ?string $customPillBlade = null, array $filterPillsItemAttributes = [], bool $renderPillsAsHtml = false, bool $watchForEvents = false, array $customResetButtonAttributes = [], bool $renderPillsTitleAsHtml = false): FilterPillData
2626
{
@@ -43,7 +43,7 @@ public function getPillValue(): array|string|null
4343

4444
public function getHasCustomPillBlade(): bool
4545
{
46-
return $this->hasCustomPillBlade ?? false;
46+
return $this->hasCustomPillBlade;
4747
}
4848

4949
public function getCustomPillBlade(): ?string
@@ -53,32 +53,32 @@ public function getCustomPillBlade(): ?string
5353

5454
public function getCustomResetButtonAttributes(): array
5555
{
56-
return $this->customResetButtonAttributes ?? [];
56+
return $this->customResetButtonAttributes;
5757
}
5858

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

6464
public function getSeparator(): string
6565
{
66-
return $this->separator ?? ', ';
66+
return $this->separator;
6767
}
6868

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

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

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

8484
public function isPillValueAnArray(): bool

src/DataTransferObjects/Filters/StandardFilterPillData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function getPillValue(): string
2828

2929
public function shouldUsePillsAsHtml(): bool
3030
{
31-
return $this->renderPillsAsHtml ?? false;
31+
return $this->renderPillsAsHtml;
3232
}
3333

3434
public function toArray(): array

src/Traits/Configuration/CollapsingColumnConfiguration.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ public function setCollapsingColumnsDisabled(): self
2727

2828
public function unsetCollapsedStatuses(): void
2929
{
30-
unset($this->shouldAlwaysCollapse);
31-
unset($this->shouldMobileCollapse);
32-
unset($this->shouldTabletCollapse);
30+
$this->shouldAlwaysCollapse = $this->shouldMobileCollapse = $this->shouldTabletCollapse = false;
31+
3332
}
3433
}

src/Views/Columns/LivewireComponentColumn.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class LivewireComponentColumn extends Column
2323

2424
/**
2525
* Gets the contents for current row
26+
*
27+
* @param Model $row
28+
* @return null|string|HtmlString|DataTableConfigurationException|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
2629
*/
2730
public function getContents(Model $row): null|string|HtmlString|DataTableConfigurationException|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
2831
{

src/Views/Columns/Traits/Configuration/LivewireComponentColumnConfiguration.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ trait LivewireComponentColumnConfiguration
88
{
99
/**
1010
* Defines which component to use
11+
*
12+
* @param string $livewireComponent
13+
* @return self
1114
*/
1215
public function component(string $livewireComponent): self
1316
{

src/Views/Columns/Traits/Helpers/LivewireComponentColumnHelpers.php

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ trait LivewireComponentColumnHelpers
1111
{
1212
/**
1313
* Retrieves the defined Component View
14+
*
15+
* @return string|null
1416
*/
1517
public function getLivewireComponent(): ?string
1618
{
@@ -19,6 +21,8 @@ public function getLivewireComponent(): ?string
1921

2022
/**
2123
* Determines whether a Livewire Component has been set
24+
*
25+
* @return boolean
2226
*/
2327
public function hasLivewireComponent(): bool
2428
{
@@ -27,6 +31,9 @@ public function hasLivewireComponent(): bool
2731

2832
/**
2933
* Retrieves attributes based on callback
34+
*
35+
* @param Model $row
36+
* @return array<mixed>
3037
*/
3138
protected function retrieveAttributes(Model $row): array
3239
{
@@ -45,8 +52,11 @@ protected function retrieveAttributes(Model $row): array
4552
return $attributes;
4653
}
4754

55+
4856
/**
4957
* Runs pre-checks
58+
*
59+
* @return boolean
5060
*/
5161
protected function runPreChecks(): bool
5262
{
@@ -67,6 +77,9 @@ protected function runPreChecks(): bool
6777

6878
/**
6979
* Implodes defined attributes to be used
80+
*
81+
* @param array<mixed> $attributes
82+
* @return string
7083
*/
7184
protected function implodeAttributes(array $attributes): string
7285
{
@@ -77,8 +90,12 @@ protected function implodeAttributes(array $attributes): string
7790

7891
/**
7992
* getBlade Render
93+
*
94+
* @param array<mixed> $attributes
95+
* @param string $key
96+
* @return string
8097
*/
81-
protected function getBlade(array $attributes, string $key)
98+
protected function getBlade(array $attributes, string $key): string
8299
{
83100
return Blade::render(
84101
'<livewire:dynamic-component :component="$component" :key="$key" '.$this->implodeAttributes($attributes).' />',
@@ -91,7 +108,11 @@ protected function getBlade(array $attributes, string $key)
91108
}
92109

93110
/**
94-
* Gets HTML STring
111+
* Gets HTML String
112+
*
113+
* @param array<mixed> $attributes
114+
* @param string $key
115+
* @return HtmlString
95116
*/
96117
protected function getHtmlString(array $attributes, string $key): HtmlString
97118
{

0 commit comments

Comments
 (0)