Commit 8a01af34 authored by Franco Fichtner's avatar Franco Fichtner

mvc: style sweep

parent 9d39f174
...@@ -73,7 +73,7 @@ class Routing ...@@ -73,7 +73,7 @@ class Routing
$this->router->add('/', array("controller" => 'index',"action" => 'index')); $this->router->add('/', array("controller" => 'index',"action" => 'index'));
$this->type = $type; $this->type = $type;
switch ($this->type){ switch ($this->type) {
case "ui": case "ui":
$this->router->setDefaultNamespace('OPNsense\Core'); $this->router->setDefaultNamespace('OPNsense\Core');
break; break;
...@@ -152,7 +152,7 @@ class Routing ...@@ -152,7 +152,7 @@ class Routing
foreach ($module_configs as $module_config) { foreach ($module_configs as $module_config) {
foreach (glob($module_config['path']."/*.php") as $filename) { foreach (glob($module_config['path']."/*.php") as $filename) {
// extract controller name and bind static in routing table // extract controller name and bind static in routing table
$controller = strtolower(str_replace('Controller.php','', basename($filename))); $controller = strtolower(str_replace('Controller.php', '', basename($filename)));
$this->router->add("/{$module_name}/{$controller}/:action/", array( $this->router->add("/{$module_name}/{$controller}/:action/", array(
"namespace" => $module_config['namespace'], "namespace" => $module_config['namespace'],
"controller" => $controller, "controller" => $controller,
......
...@@ -51,7 +51,7 @@ class Plugin ...@@ -51,7 +51,7 @@ class Plugin
* @param $priority sort order from low to high * @param $priority sort order from low to high
* @return null * @return null
*/ */
public function registerAnchor($name, $type="fw", $priority=0, $placement="tail") public function registerAnchor($name, $type = "fw", $priority = 0, $placement = "tail")
{ {
$anchorKey = sprintf("%s.%s.%08d.%08d", $type, $placement, $priority, count($this->anchors)); $anchorKey = sprintf("%s.%s.%08d.%08d", $type, $placement, $priority, count($this->anchors));
$this->anchors[$anchorKey] = $name; $this->anchors[$anchorKey] = $name;
...@@ -64,7 +64,7 @@ class Plugin ...@@ -64,7 +64,7 @@ class Plugin
* @param $priority sort order from low to high * @param $priority sort order from low to high
* @return string * @return string
*/ */
public function anchorToText($types="fw", $placement="tail") public function anchorToText($types = "fw", $placement = "tail")
{ {
$result = ""; $result = "";
foreach (explode(',', $types) as $type) { foreach (explode(',', $types) as $type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment