JonathanTorres\Construct\Construct::createNamespace PHP Method

createNamespace() protected method

Construct a correct project namespace name.
protected createNamespace ( boolean $useDoubleSlashes = false ) : string
$useDoubleSlashes boolean Whether or not to create the namespace with double slashes \\
return string
    protected function createNamespace($useDoubleSlashes = false)
    {
        $namespace = $this->settings->getNamespace();
        $projectName = $this->settings->getProjectName();
        if ($namespace === 'Vendor\\Project' || $namespace === $projectName) {
            return $this->str->createNamespace($projectName, true, $useDoubleSlashes);
        }
        return $this->str->createNamespace($namespace, false, $useDoubleSlashes);
    }