@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | /** |
| 43 | 43 | * Tests if a 13 digit ISBN is correct. |
| 44 | 44 | * |
| 45 | - * @param mixed $value The value to test. |
|
| 45 | + * @param string $value The value to test. |
|
| 46 | 46 | * |
| 47 | 47 | * @return bool |
| 48 | 48 | */ |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | /** |
| 67 | 67 | * Tests if a 10 digit ISBN is correct. |
| 68 | 68 | * |
| 69 | - * @param mixed $value The value to test. |
|
| 69 | + * @param string $value The value to test. |
|
| 70 | 70 | * |
| 71 | 71 | * @return bool |
| 72 | 72 | */ |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @param string $str string to convert case. |
| 46 | 46 | * |
| 47 | - * @return int |
|
| 47 | + * @return string |
|
| 48 | 48 | */ |
| 49 | 49 | protected function ucwords($str) |
| 50 | 50 | { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @param string $str string to convert case. |
| 62 | 62 | * |
| 63 | - * @return int |
|
| 63 | + * @return string |
|
| 64 | 64 | */ |
| 65 | 65 | protected function ucfirst($str) |
| 66 | 66 | { |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | * |
| 84 | 84 | * @param string $str string to convert case. |
| 85 | 85 | * |
| 86 | - * @return int |
|
| 86 | + * @return string |
|
| 87 | 87 | */ |
| 88 | 88 | protected function lcfirst($str) |
| 89 | 89 | { |
@@ -215,11 +215,11 @@ discard block |
||
| 215 | 215 | * Userland UTF-8-aware implementation of `str_pad()`. |
| 216 | 216 | * |
| 217 | 217 | * @param string $input The input string. |
| 218 | - * @param int $pad_length If the value of pad_length is negative, less than, or equal to the length of the input |
|
| 218 | + * @param integer $padLength If the value of pad_length is negative, less than, or equal to the length of the input |
|
| 219 | 219 | * string, no padding takes place. |
| 220 | - * @param string $pad_str Pad with this string. The pad_string may be truncated if the required number of padding |
|
| 220 | + * @param string $padStr Pad with this string. The pad_string may be truncated if the required number of padding |
|
| 221 | 221 | * characters can't be evenly divided by the pad_string's length. |
| 222 | - * @param int $pad_type Optional argument pad_type can be STR_PAD_RIGHT, STR_PAD_LEFT, or STR_PAD_BOTH. If pad_type |
|
| 222 | + * @param integer $padType Optional argument pad_type can be STR_PAD_RIGHT, STR_PAD_LEFT, or STR_PAD_BOTH. If pad_type |
|
| 223 | 223 | * is not specified it is assumed to be STR_PAD_RIGHT. |
| 224 | 224 | * |
| 225 | 225 | * @return string |
@@ -247,7 +247,6 @@ |
||
| 247 | 247 | * The optional second argument is used to supply an array of white listed items that should be considered blank. |
| 248 | 248 | * |
| 249 | 249 | * @param mixed $subject |
| 250 | - * @param array $blankWhiteList |
|
| 251 | 250 | * |
| 252 | 251 | * @return bool |
| 253 | 252 | */ |
@@ -2,10 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Mbright\Validation\Spec; |
| 4 | 4 | |
| 5 | -use Mbright\Validation\Exception\RuleClassNotDefinedException; |
|
| 6 | -use Mbright\Validation\Rule\Sanitize\SanitizeRuleInterface; |
|
| 7 | -use Mbright\Validation\Rule\Validate\ValidateRuleInterface; |
|
| 8 | - |
|
| 9 | 5 | abstract class AbstractSpec |
| 10 | 6 | { |
| 11 | 7 | /** |
@@ -114,8 +114,6 @@ |
||
| 114 | 114 | * Configure the validator to sanitize the given $field, with the given $rule. |
| 115 | 115 | * |
| 116 | 116 | * @param string $field |
| 117 | - * @param string $ruleName |
|
| 118 | - * @param array $args |
|
| 119 | 117 | * |
| 120 | 118 | * @return SanitizeSpec |
| 121 | 119 | */ |
@@ -3,10 +3,10 @@ |
||
| 3 | 3 | namespace Mbright\Validation; |
| 4 | 4 | |
| 5 | 5 | use Mbright\Validation\Exception\ValidationFailureException; |
| 6 | +use Mbright\Validation\Failure\FailureCollection; |
|
| 6 | 7 | use Mbright\Validation\Spec\AbstractSpec; |
| 7 | 8 | use Mbright\Validation\Spec\SanitizeSpec; |
| 8 | 9 | use Mbright\Validation\Spec\ValidateSpec; |
| 9 | -use Mbright\Validation\Failure\FailureCollection; |
|
| 10 | 10 | |
| 11 | 11 | class Validator |
| 12 | 12 | { |
@@ -27,8 +27,6 @@ |
||
| 27 | 27 | * |
| 28 | 28 | * @param object $subject The subject to be filtered. |
| 29 | 29 | * @param string $field The subject field name. |
| 30 | - * @param mixed $true Use this value for `true`. |
|
| 31 | - * @param mixed $false Use this value for `false`. |
|
| 32 | 30 | * |
| 33 | 31 | * @return bool Always true. |
| 34 | 32 | */ |
@@ -20,7 +20,6 @@ |
||
| 20 | 20 | * |
| 21 | 21 | * @param object $subject The subject to be filtered. |
| 22 | 22 | * @param string $field The subject field name. |
| 23 | - * @param callable $callable A callable/callback. |
|
| 24 | 23 | * |
| 25 | 24 | * @return bool True if the value was sanitized, false if not. |
| 26 | 25 | */ |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | protected $otherField; |
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | - * @param string $other_field The name of the other subject field. |
|
| 11 | + * @param string $otherField The name of the other subject field. |
|
| 12 | 12 | */ |
| 13 | 13 | public function __construct(string $otherField) |
| 14 | 14 | { |
@@ -21,8 +21,8 @@ |
||
| 21 | 21 | /** |
| 22 | 22 | * @param int $min The minimum length. |
| 23 | 23 | * @param int $max The maximum length. |
| 24 | - * @param string $pad_string Pad using this string. |
|
| 25 | - * @param int $pad_type A `STR_PAD_*` constant. |
|
| 24 | + * @param string $padString Pad using this string. |
|
| 25 | + * @param int $padType A `STR_PAD_*` constant. |
|
| 26 | 26 | * |
| 27 | 27 | */ |
| 28 | 28 | public function __construct(int $min, int $max, string $padString = ' ', int $padType = STR_PAD_RIGHT) |
@@ -17,8 +17,8 @@ |
||
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * @param int $len The string length. |
| 20 | - * @param string $pad_string Pad using this string. |
|
| 21 | - * @param int $pad_type A `STR_PAD_*` constant. |
|
| 20 | + * @param string $padString Pad using this string. |
|
| 21 | + * @param int $padType A `STR_PAD_*` constant. |
|
| 22 | 22 | */ |
| 23 | 23 | public function __construct(int $len, string $padString = ' ', int $padType = STR_PAD_RIGHT) |
| 24 | 24 | { |