| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 |      { | 
| 37 | 37 | $this->availableValidators = []; | 
| 38 | 38 |          foreach ($validators as $name => $type) { | 
| 39 | - $class = '\\Valdi\\Validator\\' . $type; | |
| 39 | + $class = '\\Valdi\\Validator\\'.$type; | |
| 40 | 40 | $this->availableValidators[$name] = new $class(); | 
| 41 | 41 | } | 
| 42 | 42 | } | 
| @@ -60,7 +60,7 @@ discard block | ||
| 60 | 60 | protected function isValidRule($validator, $parameters, $value) | 
| 61 | 61 |      { | 
| 62 | 62 |          if (!array_key_exists($validator, $this->availableValidators)) { | 
| 63 | -            throw new ValidatorException('"' . $validator . '" not found as available validator.'); | |
| 63 | +            throw new ValidatorException('"'.$validator.'" not found as available validator.'); | |
| 64 | 64 | } | 
| 65 | 65 | return $this->availableValidators[$validator]->isValid($value, $parameters) ? | 
| 66 | 66 | null : $this->availableValidators[$validator]->getInvalidDetails(); | 
| @@ -94,7 +94,7 @@ discard block | ||
| 94 | 94 |          for ($i = 0; $i < $this->amountOfParameters; ++$i) { | 
| 95 | 95 | $datetime = \DateTime::createFromFormat($format, $parameters[$i]); | 
| 96 | 96 |              if ($datetime === false) { | 
| 97 | -                throw new ValidationException('"' . $this->type . '" expects a date of the format "' . $format . '".'); | |
| 97 | +                throw new ValidationException('"'.$this->type.'" expects a date of the format "'.$format.'".'); | |
| 98 | 98 | } | 
| 99 | 99 | $datetimes[] = $datetime; | 
| 100 | 100 | } | 
| @@ -108,7 +108,7 @@ discard block | ||
| 108 | 108 |      { | 
| 109 | 109 | |
| 110 | 110 |          if (count($parameters) < $this->amountOfParameters) { | 
| 111 | -            throw new ValidationException('"' . $this->type . '" expects at least ' . $this->amountOfParameters . ' parameter.'); | |
| 111 | +            throw new ValidationException('"'.$this->type.'" expects at least '.$this->amountOfParameters.' parameter.'); | |
| 112 | 112 | } | 
| 113 | 113 | |
| 114 | 114 |          if (in_array($value, ['', null], true)) { | 
| @@ -36,7 +36,7 @@ | ||
| 36 | 36 | protected function validateParameterCount($name, $parameterAmount, array $parameters) | 
| 37 | 37 |      { | 
| 38 | 38 |          if (count($parameters) !== $parameterAmount) { | 
| 39 | -            throw new ValidationException('"' . $name . '" expects ' . $parameterAmount . ' parameter.'); | |
| 39 | +            throw new ValidationException('"'.$name.'" expects '.$parameterAmount.' parameter.'); | |
| 40 | 40 | } | 
| 41 | 41 | } | 
| 42 | 42 | |