| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 4 | public function isValid($value) |
|
| 29 | { |
||
| 30 | 4 | $this->value = $this->standardValue = $value; |
|
| 31 | |||
| 32 | 4 | foreach ($this->validators as $validator) { |
|
| 33 | 4 | $result = $validator->isValid($this->standardValue); |
|
| 34 | |||
| 35 | 3 | if (!$result) { |
|
| 36 | 1 | $this->setErrorCode($validator->getMessageCode())->setErrorMessage($validator->getMessage()); |
|
| 37 | 1 | return false; |
|
| 38 | } |
||
| 39 | |||
| 40 | 2 | $this->standardValue = $validator->getStandardValue(); |
|
| 41 | } |
||
| 42 | |||
| 43 | 1 | return true; |
|
| 44 | } |
||
| 45 | |||
| 60 |