type; } public function error(): bool { return self::TYPE_ERROR === $this->type; } public function message(): bool { return self::TYPE_MESSAGE === $this->type; } }