public function setDeclarations($declarations)
    {
        $this->declarations = [];
        if (!is_array($declarations)) {
            $declarations = [$declarations];
        }
        foreach ($declarations as $declaration) {
            $this->addDeclaration($declaration);
        }

        return $this;
    }