public function setAlias($name, $alias)
    {
        if ($alias === null && isset($this->aliases[$name])) {
            unset($this->aliases[$name]);
        } else {
            $this->aliases[$name] = $alias;
        }

        return $this;
    }