schemaProcessor = $schemaProcessor; $this->schema = $schema; } public function validateArray(array $items): ValidationResult { try { $this->schemaProcessor->process($this->schema, $items); return $this->success(); } catch (ValidationException $e) { return $this->error($e->getMessage()); } } }