Skip to content

Commit b893387

Browse files
authored
Merge pull request #6673 from ping-yee/docs-changed-strict-rule-mixed
2 parents 9d38f43 + 542099d commit b893387

2 files changed

Lines changed: 26 additions & 26 deletions

File tree

system/Validation/StrictRules/CreditCardRules.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function __construct()
4141
* 'cc_num' => 'valid_cc_number[visa]'
4242
* ];
4343
*
44-
* @param mixed $ccNumber
44+
* @param array|bool|float|int|object|string|null $ccNumber
4545
*/
4646
public function valid_cc_number($ccNumber, string $type): bool
4747
{

system/Validation/StrictRules/FormatRules.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct()
3030
/**
3131
* Alpha
3232
*
33-
* @param mixed $str
33+
* @param array|bool|float|int|object|string|null $str
3434
*/
3535
public function alpha($str = null): bool
3636
{
@@ -44,7 +44,7 @@ public function alpha($str = null): bool
4444
/**
4545
* Alpha with spaces.
4646
*
47-
* @param mixed $value Value.
47+
* @param array|bool|float|int|object|string|null $value Value.
4848
*
4949
* @return bool True if alpha with spaces, else false.
5050
*/
@@ -60,7 +60,7 @@ public function alpha_space($value = null): bool
6060
/**
6161
* Alphanumeric with underscores and dashes
6262
*
63-
* @param mixed $str
63+
* @param array|bool|float|int|object|string|null $str
6464
*/
6565
public function alpha_dash($str = null): bool
6666
{
@@ -82,7 +82,7 @@ public function alpha_dash($str = null): bool
8282
* _ underscore, + plus, = equals, | vertical bar, : colon, . period
8383
* ~ ! # $ % & * - _ + = | : .
8484
*
85-
* @param mixed $str
85+
* @param array|bool|float|int|object|string|null $str
8686
*
8787
* @return bool
8888
*/
@@ -102,7 +102,7 @@ public function alpha_numeric_punct($str)
102102
/**
103103
* Alphanumeric
104104
*
105-
* @param mixed $str
105+
* @param array|bool|float|int|object|string|null $str
106106
*/
107107
public function alpha_numeric($str = null): bool
108108
{
@@ -120,7 +120,7 @@ public function alpha_numeric($str = null): bool
120120
/**
121121
* Alphanumeric w/ spaces
122122
*
123-
* @param mixed $str
123+
* @param array|bool|float|int|object|string|null $str
124124
*/
125125
public function alpha_numeric_space($str = null): bool
126126
{
@@ -138,7 +138,7 @@ public function alpha_numeric_space($str = null): bool
138138
/**
139139
* Any type of string
140140
*
141-
* @param mixed $str
141+
* @param array|bool|float|int|object|string|null $str
142142
*/
143143
public function string($str = null): bool
144144
{
@@ -148,7 +148,7 @@ public function string($str = null): bool
148148
/**
149149
* Decimal number
150150
*
151-
* @param mixed $str
151+
* @param array|bool|float|int|object|string|null $str
152152
*/
153153
public function decimal($str = null): bool
154154
{
@@ -166,7 +166,7 @@ public function decimal($str = null): bool
166166
/**
167167
* String of hexidecimal characters
168168
*
169-
* @param mixed $str
169+
* @param array|bool|float|int|object|string|null $str
170170
*/
171171
public function hex($str = null): bool
172172
{
@@ -184,7 +184,7 @@ public function hex($str = null): bool
184184
/**
185185
* Integer
186186
*
187-
* @param mixed $str
187+
* @param array|bool|float|int|object|string|null $str
188188
*/
189189
public function integer($str = null): bool
190190
{
@@ -202,7 +202,7 @@ public function integer($str = null): bool
202202
/**
203203
* Is a Natural number (0,1,2,3, etc.)
204204
*
205-
* @param mixed $str
205+
* @param array|bool|float|int|object|string|null $str
206206
*/
207207
public function is_natural($str = null): bool
208208
{
@@ -220,7 +220,7 @@ public function is_natural($str = null): bool
220220
/**
221221
* Is a Natural number, but not a zero (1,2,3, etc.)
222222
*
223-
* @param mixed $str
223+
* @param array|bool|float|int|object|string|null $str
224224
*/
225225
public function is_natural_no_zero($str = null): bool
226226
{
@@ -238,7 +238,7 @@ public function is_natural_no_zero($str = null): bool
238238
/**
239239
* Numeric
240240
*
241-
* @param mixed $str
241+
* @param array|bool|float|int|object|string|null $str
242242
*/
243243
public function numeric($str = null): bool
244244
{
@@ -256,7 +256,7 @@ public function numeric($str = null): bool
256256
/**
257257
* Compares value against a regular expression pattern.
258258
*
259-
* @param mixed $str
259+
* @param array|bool|float|int|object|string|null $str
260260
*/
261261
public function regex_match($str, string $pattern): bool
262262
{
@@ -273,7 +273,7 @@ public function regex_match($str, string $pattern): bool
273273
*
274274
* @see http://php.net/manual/en/datetimezone.listidentifiers.php
275275
*
276-
* @param mixed $str
276+
* @param array|bool|float|int|object|string|null $str
277277
*/
278278
public function timezone($str = null): bool
279279
{
@@ -290,7 +290,7 @@ public function timezone($str = null): bool
290290
* Tests a string for characters outside of the Base64 alphabet
291291
* as defined by RFC 2045 http://www.faqs.org/rfcs/rfc2045
292292
*
293-
* @param mixed $str
293+
* @param array|bool|float|int|object|string|null $str
294294
*/
295295
public function valid_base64($str = null): bool
296296
{
@@ -304,7 +304,7 @@ public function valid_base64($str = null): bool
304304
/**
305305
* Valid JSON
306306
*
307-
* @param mixed $str
307+
* @param array|bool|float|int|object|string|null $str
308308
*/
309309
public function valid_json($str = null): bool
310310
{
@@ -318,7 +318,7 @@ public function valid_json($str = null): bool
318318
/**
319319
* Checks for a correctly formatted email address
320320
*
321-
* @param mixed $str
321+
* @param array|bool|float|int|object|string|null $str
322322
*/
323323
public function valid_email($str = null): bool
324324
{
@@ -335,7 +335,7 @@ public function valid_email($str = null): bool
335335
* Example:
336336
* valid_emails[one@example.com,two@example.com]
337337
*
338-
* @param mixed $str
338+
* @param array|bool|float|int|object|string|null $str
339339
*/
340340
public function valid_emails($str = null): bool
341341
{
@@ -349,8 +349,8 @@ public function valid_emails($str = null): bool
349349
/**
350350
* Validate an IP address (human readable format or binary string - inet_pton)
351351
*
352-
* @param mixed $ip
353-
* @param string|null $which IP protocol: 'ipv4' or 'ipv6'
352+
* @param array|bool|float|int|object|string|null $ip
353+
* @param string|null $which IP protocol: 'ipv4' or 'ipv6'
354354
*/
355355
public function valid_ip($ip = null, ?string $which = null): bool
356356
{
@@ -367,7 +367,7 @@ public function valid_ip($ip = null, ?string $which = null): bool
367367
* Warning: this rule will pass basic strings like
368368
* "banana"; use valid_url_strict for a stricter rule.
369369
*
370-
* @param mixed $str
370+
* @param array|bool|float|int|object|string|null $str
371371
*/
372372
public function valid_url($str = null): bool
373373
{
@@ -381,8 +381,8 @@ public function valid_url($str = null): bool
381381
/**
382382
* Checks a URL to ensure it's formed correctly.
383383
*
384-
* @param mixed $str
385-
* @param string|null $validSchemes comma separated list of allowed schemes
384+
* @param array|bool|float|int|object|string|null $str
385+
* @param string|null $validSchemes comma separated list of allowed schemes
386386
*/
387387
public function valid_url_strict($str = null, ?string $validSchemes = null): bool
388388
{
@@ -396,7 +396,7 @@ public function valid_url_strict($str = null, ?string $validSchemes = null): boo
396396
/**
397397
* Checks for a valid date and matches a given date format
398398
*
399-
* @param mixed $str
399+
* @param array|bool|float|int|object|string|null $str
400400
*/
401401
public function valid_date($str = null, ?string $format = null): bool
402402
{

0 commit comments

Comments
 (0)