@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | protected function createValidators(array $validators) { |
35 | 35 | $this->availableValidators = array(); |
36 | 36 | foreach ($validators as $name => $type) { |
37 | - $class = '\\Valdi\\Validator\\' . $type; |
|
37 | + $class = '\\Valdi\\Validator\\'.$type; |
|
38 | 38 | $this->availableValidators[$name] = new $class(); |
39 | 39 | } |
40 | 40 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function isValidRule($validator, $parameters, $value) { |
56 | 56 | if (!array_key_exists($validator, $this->availableValidators)) { |
57 | - throw new ValidatorException('"' . $validator . '" not found as available validator.'); |
|
57 | + throw new ValidatorException('"'.$validator.'" not found as available validator.'); |
|
58 | 58 | } |
59 | 59 | return $this->availableValidators[$validator]->isValid($value, $parameters); |
60 | 60 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | for ($i = 0; $i < $this->amountOfParameters; ++$i) { |
89 | 89 | $datetime = \DateTime::createFromFormat($format, $parameters[$i]); |
90 | 90 | if ($datetime === false) { |
91 | - throw new ValidationException('"' . $this->type . '" expects a date of the format "' . $format . '".'); |
|
91 | + throw new ValidationException('"'.$this->type.'" expects a date of the format "'.$format.'".'); |
|
92 | 92 | } |
93 | 93 | $datetimes[] = $datetime; |
94 | 94 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | public function isValid($value, array $parameters) { |
102 | 102 | |
103 | 103 | if (count($parameters) < $this->amountOfParameters) { |
104 | - throw new ValidationException('"' . $this->type . '" expects at least ' . $this->amountOfParameters . ' parameter.'); |
|
104 | + throw new ValidationException('"'.$this->type.'" expects at least '.$this->amountOfParameters.' parameter.'); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | if (in_array($value, array('', null), true)) { |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | protected function validateParameterCount($name, $parameterAmount, array $parameters) { |
33 | 33 | if (count($parameters) !== $parameterAmount) { |
34 | - throw new ValidationException('"' . $name . '" expects ' . $parameterAmount . ' parameter.'); |
|
34 | + throw new ValidationException('"'.$name.'" expects '.$parameterAmount.' parameter.'); |
|
35 | 35 | } |
36 | 36 | } |
37 | 37 |
@@ -51,7 +51,7 @@ |
||
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
54 | - return false; |
|
55 | - } |
|
54 | + return false; |
|
55 | + } |
|
56 | 56 | |
57 | 57 | } |