Completed
Push — master ( a378d5...7b6893 )
by Flo
28s
created
src/View/ViewController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function getVariable($key)
119 119
     {
120
-        if(isset($this->variable[$key])) {
120
+        if (isset($this->variable[$key])) {
121 121
             return $this->variable[$key];
122 122
         }
123 123
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function hasVariable(string $key) :bool
133 133
     {
134
-        if(isset($this->variable[$key])) {
134
+        if (isset($this->variable[$key])) {
135 135
             return true;
136 136
         }
137 137
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function setVariables(array $variables = []) :self
147 147
     {
148
-        foreach($variables AS $key=>$value) {
148
+        foreach ($variables AS $key=>$value) {
149 149
             $this->setVariable($key, $value);
150 150
         }
151 151
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
         ob_end_clean();
207 207
 
208
-        if( $this->getParentTemplate() instanceof ViewController ) {
208
+        if ($this->getParentTemplate() instanceof ViewController) {
209 209
             return $this->cleanOutput($this->getParentTemplate()->setVariables($this->getVariables())->render());
210 210
         } else {
211 211
             return $this->cleanOutput($content);
@@ -253,8 +253,8 @@  discard block
 block discarded – undo
253 253
      */
254 254
     public function __destruct()
255 255
     {
256
-        unset( $this->variable );
257
-        unset( $this->template );
256
+        unset($this->variable);
257
+        unset($this->template);
258 258
     }
259 259
 
260 260
 }
261 261
\ No newline at end of file
Please login to merge, or discard this patch.
src/View/Helper/RenderBlock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function __invoke(ViewController $view, string $block, string $defaultValue = '')
27 27
     {
28
-        if($view->getVariable($block) === '') {
28
+        if ($view->getVariable($block) === '') {
29 29
             return $defaultValue;
30 30
         }
31 31
         return trim($view->getVariable($block));
Please login to merge, or discard this patch.
src/View/Helper/AssetList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         }
41 41
 
42 42
         /** @var array $files */
43
-        $files = $view->getVariable('assets'.ucfirst($type));
43
+        $files = $view->getVariable('assets' . ucfirst($type));
44 44
 
45 45
         foreach ($files AS $file) {
46 46
             $result .= sprintf($pattern, $file) . "\n";
Please login to merge, or discard this patch.
src/View/Helper/Route.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         foreach ($routes as $routeName => $data) {
40 40
 
41 41
             if ($routeName === $name) {
42
-                $path = preg_replace('|/\((.*)\)|', '', $data['path']);;
42
+                $path = preg_replace('|/\((.*)\)|', '', $data['path']); ;
43 43
                 break;
44 44
             }
45 45
 
Please login to merge, or discard this patch.
src/View/Helper/RenderView.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
     public function __invoke(ViewController $view, string $template = '', array $variables = [])
27 27
     {
28 28
         $view = new ViewController();
29
-        $view->setTemplate( $template );
30
-        $view->setVariables( $variables );
29
+        $view->setTemplate($template);
30
+        $view->setVariables($variables);
31 31
         return $view->render();
32 32
     }
33 33
 
Please login to merge, or discard this patch.