Completed
Push — master ( 36736f...9cf8bc )
by Thierry
01:26
created
src/Utils/View/Manager.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             'directory' => $sDirectory,
79 79
             'extension' => $sExtension,
80 80
         ];
81
-        if(key_exists($sRenderer, $this->aNamespaces))
81
+        if (key_exists($sRenderer, $this->aNamespaces))
82 82
         {
83 83
             $this->aNamespaces[$sRenderer][] = $aNamespace;
84 84
         }
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
     public function addNamespaces($xAppConfig)
100 100
     {
101 101
         $this->sDefaultNamespace = $xAppConfig->getOption('options.views.default', false);
102
-        if(is_array($namespaces = $xAppConfig->getOptionNames('views')))
102
+        if (is_array($namespaces = $xAppConfig->getOptionNames('views')))
103 103
         {
104
-            foreach($namespaces as $namespace => $option)
104
+            foreach ($namespaces as $namespace => $option)
105 105
             {
106 106
                 // If no default namespace is defined, use the first one as default.
107
-                if($this->sDefaultNamespace == false)
107
+                if ($this->sDefaultNamespace == false)
108 108
                 {
109 109
                     $this->sDefaultNamespace = (string)$namespace;
110 110
                 }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function getRenderer($sId = '')
128 128
     {
129
-        if(!$sId)
129
+        if (!$sId)
130 130
         {
131 131
             // Return the view renderer facade
132 132
             return jaxon()->di()->get(\Jaxon\Utils\View\Renderer::class);
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
         jaxon()->di()->set('jaxon.app.view.base.' . $sId, $xClosure);
150 150
 
151 151
         // Return the initialized view renderer
152
-        jaxon()->di()->set('jaxon.app.view.' . $sId, function ($c) use ($sId) {
152
+        jaxon()->di()->set('jaxon.app.view.' . $sId, function($c) use ($sId) {
153 153
             // Get the defined renderer
154 154
             $renderer = $c['jaxon.app.view.base.' . $sId];
155 155
 
156 156
             // Init the renderer with the template namespaces
157
-            if(key_exists($sId, $this->aNamespaces))
157
+            if (key_exists($sId, $this->aNamespaces))
158 158
             {
159
-                foreach($this->aNamespaces[$sId] as $ns)
159
+                foreach ($this->aNamespaces[$sId] as $ns)
160 160
                 {
161 161
                     $renderer->addNamespace($ns['namespace'], $ns['directory'], $ns['extension']);
162 162
                 }
Please login to merge, or discard this patch.