| Conditions | 5 |
| Paths | 8 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | 1 | public function run($break_when_error = false) : bool |
|
| 51 | { |
||
| 52 | /** @var Field $field */ |
||
| 53 | 1 | foreach ($this->fields as $field) { |
|
| 54 | 1 | if (!$field->isValid($this->language)) { |
|
| 55 | 1 | $this->errors[$field->getName()] = $field->getError(); |
|
| 56 | 1 | if ($break_when_error) { |
|
| 57 | 1 | break; |
|
| 58 | } |
||
| 59 | } |
||
| 60 | } |
||
| 61 | |||
| 62 | 1 | return empty($this->errors) ? true : false; |
|
| 63 | } |
||
| 64 | |||
| 85 | } |