TheSeer\Autoload\Parser::registerUnit PHP Method

registerUnit() private method

private registerUnit ( $name, $type )
    private function registerUnit($name, $type)
    {
        if ($name == '' || substr($name, -1) == '\\') {
            throw new ParserException(sprintf("Parse error while trying to process %s definition.", $this->typeMap[$type]), ParserException::ParseError);
        }
        if ($this->caseInsensitive) {
            $name = strtolower($name);
        }
        if (in_array($name, $this->found)) {
            $this->redeclarations[] = $name;
        } else {
            $this->found[] = $name;
        }
        return $name;
    }