public function enqueue()
    {
        if (is_null($this->getType())) {
            throw new AssetException('The asset must have a type defined. Null given.');
        }

        if ('script' === $this->getType()) {
            $this->enqueueScript();
        } else {
            $this->enqueueStyle();
        }
    }