Completed
Pull Request — master (#12)
by Flo
02:50
created
src/View/GenericViewHelper.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
     public function render(string $template = "", array $variables = [])
56 56
     {
57 57
         $view = new ViewController();
58
-        $view->setTemplate( $template );
59
-        $view->setVariables( $variables );
58
+        $view->setTemplate($template);
59
+        $view->setVariables($variables);
60 60
         return $view->render();
61 61
     }
62 62
 
@@ -101,10 +101,10 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function renderBlock(string $name, string $default = "")
103 103
     {
104
-        if($this->view->getVariable($name) == null) {
104
+        if ($this->view->getVariable($name) == null) {
105 105
             return $default;
106 106
         }
107
-        return trim($this->view->getVariable( $name ));
107
+        return trim($this->view->getVariable($name));
108 108
     }
109 109
 
110 110
     /**
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function escape(string $string)
116 116
     {
117
-        return stripslashes( strip_tags( $string ) );
117
+        return stripslashes(strip_tags($string));
118 118
     }
119 119
 
120 120
     /**
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
 
140 140
         }
141 141
 
142
-        $files = $this->view->getVariable('assets'.ucfirst($type));
142
+        $files = $this->view->getVariable('assets' . ucfirst($type));
143 143
 
144 144
         foreach ($files AS $file) {
145
-            $result .= sprintf($pattern, $file). "\n";
145
+            $result .= sprintf($pattern, $file) . "\n";
146 146
         }
147 147
 
148 148
         return $result;
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 
221 221
             if ($routeName === $name) {
222 222
 
223
-                $path = preg_replace('|/\((.*)\)|', '', $data['path']);;
223
+                $path = preg_replace('|/\((.*)\)|', '', $data['path']); ;
224 224
                 break;
225 225
             }
226 226
 
Please login to merge, or discard this patch.