Skip to content

Commit

Permalink
rename defaultNameSpace to defaultNamespace
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Jul 13, 2020
1 parent 01ba49f commit 56c780b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions system/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,11 +548,11 @@ public function autoRoute(string $uri)
$this->params = $segments;
}

$defaultNameSpace = $this->collection->getDefaultNamespace();
$defaultNamespace = $this->collection->getDefaultNamespace();
$controllerName = $this->controllerName();
if ($this->collection->getHTTPVerb() !== 'cli')
{
$controller = '\\' . $defaultNameSpace;
$controller = '\\' . $defaultNamespace;
$controller .= $this->directory ? str_replace('/', '\\', $this->directory) : '';
$controller .= $controllerName;
$controller = strtolower($controller);
Expand Down Expand Up @@ -585,9 +585,9 @@ public function autoRoute(string $uri)

// Ensure the controller stores the fully-qualified class name
// We have to check for a length over 1, since by default it will be '\'
if (strpos($this->controller, '\\') === false && strlen($defaultNameSpace) > 1)
if (strpos($this->controller, '\\') === false && strlen($defaultNamespace) > 1)
{
$this->controller = '\\' . ltrim(str_replace('/', '\\', $defaultNameSpace . $this->directory . $controllerName), '\\');
$this->controller = '\\' . ltrim(str_replace('/', '\\', $defaultNamespace . $this->directory . $controllerName), '\\');
}
}

Expand Down

0 comments on commit 56c780b

Please sign in to comment.