*/ private $errors; /** * @param bool $isValid * @param array $errors */ public function __construct( bool $isValid, array $errors ) { $this->isValid = $isValid; $this->errors = $errors; } public function isValid(): bool { return $this->isValid; } /** * @return array */ public function getErrors(): array { return $this->errors; } }