| @@ 57-69 (lines=13) @@ | ||
| 54 | /** |
|
| 55 | * @inheritdoc |
|
| 56 | */ |
|
| 57 | public function validate($input): bool |
|
| 58 | { |
|
| 59 | if ($this->areAggregatorsDirty() === true) { |
|
| 60 | $this->resetAggregators(); |
|
| 61 | } |
|
| 62 | ||
| 63 | $this->validateArrayImplementation($input, $this->getCaptures(), $this->getErrors()); |
|
| 64 | $this->markAggregatorsAsDirty(); |
|
| 65 | ||
| 66 | $hasErrors = $this->getErrors()->count() > 0; |
|
| 67 | ||
| 68 | return $hasErrors; |
|
| 69 | } |
|
| 70 | ||
| 71 | /** |
|
| 72 | * During validation you can pass to rules your custom context which might have any additional |
|
| @@ 60-72 (lines=13) @@ | ||
| 57 | * |
|
| 58 | * @SuppressWarnings(PHPMD.StaticAccess) |
|
| 59 | */ |
|
| 60 | public function validate($input): bool |
|
| 61 | { |
|
| 62 | if ($this->areAggregatorsDirty() === true) { |
|
| 63 | $this->resetAggregators(); |
|
| 64 | } |
|
| 65 | ||
| 66 | $this->validateImplementation($input, $this->getCaptures(), $this->getErrors()); |
|
| 67 | $this->markAggregatorsAsDirty(); |
|
| 68 | ||
| 69 | $noErrors = $this->getErrors()->count() <= 0; |
|
| 70 | ||
| 71 | return $noErrors; |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * @param array $blocks |
|