Skip to content

Commit fd3b230

Browse files
authored
Merge pull request #6643 from ping-yee/docs-strictRule-rule-mixed
docs: replace types `mixed` at `Validation\StrictRules\Rule`.
2 parents 2a8f8c7 + d911961 commit fd3b230

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

system/Validation/StrictRules/Rules.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public function __construct()
3131
/**
3232
* The value does not match another field in $data.
3333
*
34-
* @param mixed $str
35-
* @param array $data Other field/value pairs
34+
* @param array|bool|float|int|object|string|null $str
35+
* @param array $data Other field/value pairs
3636
*/
3737
public function differs($str, string $field, array $data): bool
3838
{
@@ -46,7 +46,7 @@ public function differs($str, string $field, array $data): bool
4646
/**
4747
* Equals the static value provided.
4848
*
49-
* @param mixed $str
49+
* @param array|bool|float|int|object|string|null $str
5050
*/
5151
public function equals($str, string $val): bool
5252
{
@@ -57,7 +57,7 @@ public function equals($str, string $val): bool
5757
* Returns true if $str is $val characters long.
5858
* $val = "5" (one) | "5,8,12" (multiple values)
5959
*
60-
* @param mixed $str
60+
* @param array|bool|float|int|object|string|null $str
6161
*/
6262
public function exact_length($str, string $val): bool
6363
{
@@ -71,7 +71,7 @@ public function exact_length($str, string $val): bool
7171
/**
7272
* Greater than
7373
*
74-
* @param mixed $str expects int|string
74+
* @param array|bool|float|int|object|string|null $str expects int|string
7575
*/
7676
public function greater_than($str, string $min): bool
7777
{
@@ -89,7 +89,7 @@ public function greater_than($str, string $min): bool
8989
/**
9090
* Equal to or Greater than
9191
*
92-
* @param mixed $str expects int|string
92+
* @param array|bool|float|int|object|string|null $str expects int|string
9393
*/
9494
public function greater_than_equal_to($str, string $min): bool
9595
{
@@ -113,7 +113,7 @@ public function greater_than_equal_to($str, string $min): bool
113113
* is_not_unique[table.field,where_field,where_value]
114114
* is_not_unique[menu.id,active,1]
115115
*
116-
* @param mixed $str
116+
* @param array|bool|float|int|object|string|null $str
117117
*/
118118
public function is_not_unique($str, string $field, array $data): bool
119119
{
@@ -123,7 +123,7 @@ public function is_not_unique($str, string $field, array $data): bool
123123
/**
124124
* Value should be within an array of values
125125
*
126-
* @param mixed $value
126+
* @param array|bool|float|int|object|string|null $value
127127
*/
128128
public function in_list($value, string $list): bool
129129
{
@@ -147,7 +147,7 @@ public function in_list($value, string $list): bool
147147
* is_unique[table.field,ignore_field,ignore_value]
148148
* is_unique[users.email,id,5]
149149
*
150-
* @param mixed $str
150+
* @param array|bool|float|int|object|string|null $str
151151
*/
152152
public function is_unique($str, string $field, array $data): bool
153153
{
@@ -157,7 +157,7 @@ public function is_unique($str, string $field, array $data): bool
157157
/**
158158
* Less than
159159
*
160-
* @param mixed $str expects int|string
160+
* @param array|bool|float|int|object|string|null $str expects int|string
161161
*/
162162
public function less_than($str, string $max): bool
163163
{
@@ -175,7 +175,7 @@ public function less_than($str, string $max): bool
175175
/**
176176
* Equal to or Less than
177177
*
178-
* @param mixed $str expects int|string
178+
* @param array|bool|float|int|object|string|null $str expects int|string
179179
*/
180180
public function less_than_equal_to($str, string $max): bool
181181
{
@@ -193,8 +193,8 @@ public function less_than_equal_to($str, string $max): bool
193193
/**
194194
* Matches the value of another field in $data.
195195
*
196-
* @param mixed $str
197-
* @param array $data Other field/value pairs
196+
* @param array|bool|float|int|object|string|null $str
197+
* @param array $data Other field/value pairs
198198
*/
199199
public function matches($str, string $field, array $data): bool
200200
{
@@ -204,7 +204,7 @@ public function matches($str, string $field, array $data): bool
204204
/**
205205
* Returns true if $str is $val or fewer characters in length.
206206
*
207-
* @param mixed $str
207+
* @param array|bool|float|int|object|string|null $str
208208
*/
209209
public function max_length($str, string $val): bool
210210
{
@@ -222,7 +222,7 @@ public function max_length($str, string $val): bool
222222
/**
223223
* Returns true if $str is at least $val length.
224224
*
225-
* @param mixed $str
225+
* @param array|bool|float|int|object|string|null $str
226226
*/
227227
public function min_length($str, string $val): bool
228228
{
@@ -240,7 +240,7 @@ public function min_length($str, string $val): bool
240240
/**
241241
* Does not equal the static value provided.
242242
*
243-
* @param mixed $str
243+
* @param array|bool|float|int|object|string|null $str
244244
*/
245245
public function not_equals($str, string $val): bool
246246
{
@@ -250,7 +250,7 @@ public function not_equals($str, string $val): bool
250250
/**
251251
* Value should not be within an array of values.
252252
*
253-
* @param mixed $value
253+
* @param array|bool|float|int|object|string|null $value
254254
*/
255255
public function not_in_list($value, string $list): bool
256256
{
@@ -270,7 +270,7 @@ public function not_in_list($value, string $list): bool
270270
}
271271

272272
/**
273-
* @param mixed $str
273+
* @param array|bool|float|int|object|string|null $str
274274
*/
275275
public function required($str = null): bool
276276
{
@@ -285,9 +285,9 @@ public function required($str = null): bool
285285
*
286286
* required_with[password]
287287
*
288-
* @param mixed $str
289-
* @param string|null $fields List of fields that we should check if present
290-
* @param array $data Complete list of fields from the form
288+
* @param array|bool|float|int|object|string|null $str
289+
* @param string|null $fields List of fields that we should check if present
290+
* @param array $data Complete list of fields from the form
291291
*/
292292
public function required_with($str = null, ?string $fields = null, array $data = []): bool
293293
{
@@ -302,9 +302,9 @@ public function required_with($str = null, ?string $fields = null, array $data =
302302
*
303303
* required_without[id,email]
304304
*
305-
* @param string|null $str
306-
* @param string|null $otherFields The param fields of required_without[].
307-
* @param string|null $field This rule param fields aren't present, this field is required.
305+
* @param array|bool|float|int|object|string|null $str
306+
* @param string|null $otherFields The param fields of required_without[].
307+
* @param string|null $field This rule param fields aren't present, this field is required.
308308
*/
309309
public function required_without($str = null, ?string $otherFields = null, array $data = [], ?string $error = null, ?string $field = null): bool
310310
{

0 commit comments

Comments
 (0)