@@ -11,16 +11,16 @@ |
||
| 11 | 11 | |
| 12 | 12 | namespace yolk\support\Exceptions; |
| 13 | 13 | |
| 14 | -class ValidationException extends \DomainException {
|
|
| 14 | +class ValidationException extends \DomainException { |
|
| 15 | 15 | |
| 16 | 16 | protected $errors = []; |
| 17 | 17 | |
| 18 | - public function __construct( array $errors, $source, \Exception $previous = null ) {
|
|
| 18 | + public function __construct( array $errors, $source, \Exception $previous = null ) { |
|
| 19 | 19 | parent::__construct("Validation Error: {$source}");
|
| 20 | 20 | $this->errors = $errors; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | - public function getErrors() {
|
|
| 23 | + public function getErrors() { |
|
| 24 | 24 | return $this->errors; |
| 25 | 25 | } |
| 26 | 26 | |
@@ -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 ) { |
@@ -225,7 +225,7 @@ |
||
| 225 | 225 | * @param integer $limit |
| 226 | 226 | * @return self |
| 227 | 227 | */ |
| 228 | - public function limit( $limit ) { |
|
| 228 | + public function limit( $limit ) { |
|
| 229 | 229 | $this->limit = max(1, (int) $limit); |
| 230 | 230 | return $this; |
| 231 | 231 | } |