Skip to content

Commit ef508bd

Browse files
authored
FilterPillData and StandardFilterPillData phpdocs
1 parent 39ccdf8 commit ef508bd

File tree

2 files changed

+54
-3
lines changed

2 files changed

+54
-3
lines changed

src/DataTransferObjects/Filters/FilterPillData.php

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public static function make(string $filterKey, string $filterPillTitle, string|a
3333

3434
/**
3535
* Get the Filter Key
36+
*
37+
* @return string
3638
*/
3739
public function getFilterKey(): string
3840
{
@@ -41,6 +43,8 @@ public function getFilterKey(): string
4143

4244
/**
4345
* Get the title for the Filter Pill
46+
*
47+
* @return string
4448
*/
4549
public function getTitle(): string
4650
{
@@ -59,6 +63,8 @@ public function getPillValue(): array|string|null
5963

6064
/**
6165
* Determing if there is a Custom Pill blade set
66+
*
67+
* @return boolean
6268
*/
6369
public function getHasCustomPillBlade(): bool
6470
{
@@ -67,6 +73,8 @@ public function getHasCustomPillBlade(): bool
6773

6874
/**
6975
* Get The Custom Pill Blade (if set)
76+
*
77+
* @return string|null
7078
*/
7179
public function getCustomPillBlade(): ?string
7280
{
@@ -85,6 +93,8 @@ public function getCustomResetButtonAttributes(): array
8593

8694
/**
8795
* Determine of this is an External Livewire Filter
96+
*
97+
* @return integer
8898
*/
8999
public function getIsAnExternalLivewireFilter(): int
90100
{
@@ -93,6 +103,8 @@ public function getIsAnExternalLivewireFilter(): int
93103

94104
/**
95105
* Get the Separator for Pill Values
106+
*
107+
* @return string
96108
*/
97109
public function getSeparator(): string
98110
{
@@ -101,6 +113,8 @@ public function getSeparator(): string
101113

102114
/**
103115
* Determine if Pills should render as HTML
116+
*
117+
* @return integer
104118
*/
105119
public function shouldUsePillsAsHtml(): int
106120
{
@@ -109,6 +123,8 @@ public function shouldUsePillsAsHtml(): int
109123

110124
/**
111125
* Determine if Pill Title should render as HTML
126+
*
127+
* @return integer
112128
*/
113129
public function shouldUsePillsTitleAsHtml(): int
114130
{
@@ -117,14 +133,18 @@ public function shouldUsePillsTitleAsHtml(): int
117133

118134
/**
119135
* Determine if Should watch for Events (i.e. is an External Filter)
136+
*
137+
* @return integer
120138
*/
121-
public function shouldWatchForEvents(): int
139+
public function shouldWatchForEvents(): int
122140
{
123141
return intval($this->watchForEvents);
124142
}
125143

126144
/**
127145
* Determine if Pill Value is an Array
146+
*
147+
* @return boolean
128148
*/
129149
public function isPillValueAnArray(): bool
130150
{
@@ -133,6 +153,8 @@ public function isPillValueAnArray(): bool
133153

134154
/**
135155
* Return the separator separated value for the pill
156+
*
157+
* @return string|null
136158
*/
137159
public function getSeparatedPillValue(): ?string
138160
{
@@ -145,6 +167,8 @@ public function getSeparatedPillValue(): ?string
145167

146168
/**
147169
* Return the safe, separator separated value for the pill
170+
*
171+
* @return string|null
148172
*/
149173
public function getSafeSeparatedPillValue(): ?string
150174
{
@@ -224,6 +248,8 @@ public function getFilterTitleDisplayDataArray(array $array = []): array
224248
/**
225249
* Get the initial setup data
226250
*
251+
* @param string $filterKey
252+
* @param boolean $shouldWatch
227253
* @return array<mixed>
228254
*/
229255
public function getPillSetupData(string $filterKey = '', bool $shouldWatch = false): array
@@ -236,7 +262,8 @@ public function getPillSetupData(string $filterKey = '', bool $shouldWatch = fal
236262
/**
237263
* Calculate Any Reset Button Attributes
238264
*
239-
* @param array<mixed> $filterPillsResetFilterButtonAttributes
265+
* @param string $filterKey
266+
* @param array<mixed> $filterPillsResetFilterButtonAttributes
240267
* @return array<mixed>
241268
*/
242269
public function getCalculatedCustomResetButtonAttributes(string $filterKey, array $filterPillsResetFilterButtonAttributes): array

src/DataTransferObjects/Filters/StandardFilterPillData.php

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,50 @@ public static function make(string $filterPillTitle, string $filterSelectName, s
1111
return new self($filterPillTitle, $filterSelectName, $filterPillValue, $renderPillsAsHtml);
1212
}
1313

14+
/**
15+
* Get the Pill Title
16+
*
17+
* @return string
18+
*/
1419
public function getTitle(): string
1520
{
1621
return $this->filterPillTitle;
1722
}
1823

24+
/**
25+
* Get the Filter Select Name
26+
*
27+
* @return string
28+
*/
1929
public function getSelectName(): string
2030
{
2131
return $this->filterSelectName;
2232
}
2333

34+
/**
35+
* Get The Pill Value
36+
*
37+
* @return string
38+
*/
2439
public function getPillValue(): string
2540
{
2641
return $this->filterPillValue;
2742
}
2843

44+
/**
45+
* Should Use Pills as HTML
46+
*
47+
* @return boolean
48+
*/
2949
public function shouldUsePillsAsHtml(): bool
3050
{
3151
return $this->renderPillsAsHtml;
3252
}
33-
53+
/**
54+
* Returns the data to an array
55+
*
56+
* @return array<mixed>
57+
*/
3458
public function toArray(): array
3559
{
3660
return [

0 commit comments

Comments
 (0)