@@ -31,8 +31,8 @@ public function __construct()
31
31
/**
32
32
* The value does not match another field in $data.
33
33
*
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
36
36
*/
37
37
public function differs ($ str , string $ field , array $ data ): bool
38
38
{
@@ -46,7 +46,7 @@ public function differs($str, string $field, array $data): bool
46
46
/**
47
47
* Equals the static value provided.
48
48
*
49
- * @param mixed $str
49
+ * @param array|bool|float|int|object|string|null $str
50
50
*/
51
51
public function equals ($ str , string $ val ): bool
52
52
{
@@ -57,7 +57,7 @@ public function equals($str, string $val): bool
57
57
* Returns true if $str is $val characters long.
58
58
* $val = "5" (one) | "5,8,12" (multiple values)
59
59
*
60
- * @param mixed $str
60
+ * @param array|bool|float|int|object|string|null $str
61
61
*/
62
62
public function exact_length ($ str , string $ val ): bool
63
63
{
@@ -71,7 +71,7 @@ public function exact_length($str, string $val): bool
71
71
/**
72
72
* Greater than
73
73
*
74
- * @param mixed $str expects int|string
74
+ * @param array|bool|float|int|object|string|null $str expects int|string
75
75
*/
76
76
public function greater_than ($ str , string $ min ): bool
77
77
{
@@ -89,7 +89,7 @@ public function greater_than($str, string $min): bool
89
89
/**
90
90
* Equal to or Greater than
91
91
*
92
- * @param mixed $str expects int|string
92
+ * @param array|bool|float|int|object|string|null $str expects int|string
93
93
*/
94
94
public function greater_than_equal_to ($ str , string $ min ): bool
95
95
{
@@ -113,7 +113,7 @@ public function greater_than_equal_to($str, string $min): bool
113
113
* is_not_unique[table.field,where_field,where_value]
114
114
* is_not_unique[menu.id,active,1]
115
115
*
116
- * @param mixed $str
116
+ * @param array|bool|float|int|object|string|null $str
117
117
*/
118
118
public function is_not_unique ($ str , string $ field , array $ data ): bool
119
119
{
@@ -123,7 +123,7 @@ public function is_not_unique($str, string $field, array $data): bool
123
123
/**
124
124
* Value should be within an array of values
125
125
*
126
- * @param mixed $value
126
+ * @param array|bool|float|int|object|string|null $value
127
127
*/
128
128
public function in_list ($ value , string $ list ): bool
129
129
{
@@ -147,7 +147,7 @@ public function in_list($value, string $list): bool
147
147
* is_unique[table.field,ignore_field,ignore_value]
148
148
* is_unique[users.email,id,5]
149
149
*
150
- * @param mixed $str
150
+ * @param array|bool|float|int|object|string|null $str
151
151
*/
152
152
public function is_unique ($ str , string $ field , array $ data ): bool
153
153
{
@@ -157,7 +157,7 @@ public function is_unique($str, string $field, array $data): bool
157
157
/**
158
158
* Less than
159
159
*
160
- * @param mixed $str expects int|string
160
+ * @param array|bool|float|int|object|string|null $str expects int|string
161
161
*/
162
162
public function less_than ($ str , string $ max ): bool
163
163
{
@@ -175,7 +175,7 @@ public function less_than($str, string $max): bool
175
175
/**
176
176
* Equal to or Less than
177
177
*
178
- * @param mixed $str expects int|string
178
+ * @param array|bool|float|int|object|string|null $str expects int|string
179
179
*/
180
180
public function less_than_equal_to ($ str , string $ max ): bool
181
181
{
@@ -193,8 +193,8 @@ public function less_than_equal_to($str, string $max): bool
193
193
/**
194
194
* Matches the value of another field in $data.
195
195
*
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
198
198
*/
199
199
public function matches ($ str , string $ field , array $ data ): bool
200
200
{
@@ -204,7 +204,7 @@ public function matches($str, string $field, array $data): bool
204
204
/**
205
205
* Returns true if $str is $val or fewer characters in length.
206
206
*
207
- * @param mixed $str
207
+ * @param array|bool|float|int|object|string|null $str
208
208
*/
209
209
public function max_length ($ str , string $ val ): bool
210
210
{
@@ -222,7 +222,7 @@ public function max_length($str, string $val): bool
222
222
/**
223
223
* Returns true if $str is at least $val length.
224
224
*
225
- * @param mixed $str
225
+ * @param array|bool|float|int|object|string|null $str
226
226
*/
227
227
public function min_length ($ str , string $ val ): bool
228
228
{
@@ -240,7 +240,7 @@ public function min_length($str, string $val): bool
240
240
/**
241
241
* Does not equal the static value provided.
242
242
*
243
- * @param mixed $str
243
+ * @param array|bool|float|int|object|string|null $str
244
244
*/
245
245
public function not_equals ($ str , string $ val ): bool
246
246
{
@@ -250,7 +250,7 @@ public function not_equals($str, string $val): bool
250
250
/**
251
251
* Value should not be within an array of values.
252
252
*
253
- * @param mixed $value
253
+ * @param array|bool|float|int|object|string|null $value
254
254
*/
255
255
public function not_in_list ($ value , string $ list ): bool
256
256
{
@@ -270,7 +270,7 @@ public function not_in_list($value, string $list): bool
270
270
}
271
271
272
272
/**
273
- * @param mixed $str
273
+ * @param array|bool|float|int|object|string|null $str
274
274
*/
275
275
public function required ($ str = null ): bool
276
276
{
@@ -285,9 +285,9 @@ public function required($str = null): bool
285
285
*
286
286
* required_with[password]
287
287
*
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
291
291
*/
292
292
public function required_with ($ str = null , ?string $ fields = null , array $ data = []): bool
293
293
{
@@ -302,9 +302,9 @@ public function required_with($str = null, ?string $fields = null, array $data =
302
302
*
303
303
* required_without[id,email]
304
304
*
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.
308
308
*/
309
309
public function required_without ($ str = null , ?string $ otherFields = null , array $ data = [], ?string $ error = null , ?string $ field = null ): bool
310
310
{
0 commit comments