@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | $method = $validators[$type]; |
| 212 | 212 | $clean = Validator::$method($v); |
| 213 | 213 | } |
| 214 | - elseif( in_array($type, [Type::OBJECT, Type::ENTITY]) ){ |
|
| 214 | + elseif( in_array($type, [Type::OBJECT, Type::ENTITY]) ) { |
|
| 215 | 215 | $clean = Validator::validateObject($v, $this->rules['class'], $this->nullable); |
| 216 | 216 | } |
| 217 | 217 | elseif( $type == Type::BINARY ) { |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | $this->required = $rules['required']; |
| 292 | 292 | $this->nullable = $rules['nullable']; |
| 293 | 293 | $this->default = $rules['default']; |
| 294 | - $this->label = $rules['label']; |
|
| 294 | + $this->label = $rules['label']; |
|
| 295 | 295 | |
| 296 | 296 | unset( |
| 297 | 297 | $rules['required'], |
@@ -211,7 +211,7 @@ |
||
| 211 | 211 | $method = $validators[$type]; |
| 212 | 212 | $clean = Validator::$method($v); |
| 213 | 213 | } |
| 214 | - elseif( in_array($type, [Type::OBJECT, Type::ENTITY]) ){ |
|
| 214 | + elseif( in_array($type, [Type::OBJECT, Type::ENTITY]) ) { |
|
| 215 | 215 | $clean = Validator::validateObject($v, $this->rules['class'], $this->nullable); |
| 216 | 216 | } |
| 217 | 217 | elseif( $type == Type::BINARY ) { |
@@ -163,7 +163,7 @@ |
||
| 163 | 163 | return [$v, Error::REQUIRED]; |
| 164 | 164 | |
| 165 | 165 | elseif( !$this->nullable && ($v === null) ) |
| 166 | - return [$v, Error::NULL]; |
|
| 166 | + return [$v, Error::null]; |
|
| 167 | 167 | |
| 168 | 168 | list($clean, $error) = $this->validateType($v, $this->type); |
| 169 | 169 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public static function __callStatic( $name, $args ) { |
| 28 | 28 | |
| 29 | - $name = 'validate'. substr($name, 2); |
|
| 29 | + $name = 'validate' . substr($name, 2); |
|
| 30 | 30 | |
| 31 | 31 | if( !method_exists(__CLASS__, $name) ) |
| 32 | 32 | throw new \BadMethodCallException(sprintf("%s::%s()", get_called_class(), $name)); |