Completed
Branch master (736450)
by Flo
06:17 queued 03:16
created
src/Controller/Dispatcher.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -285,7 +285,7 @@
 block discarded – undo
285 285
     /**
286 286
      * Save route params into cache
287 287
      *
288
-     * @param $uri
288
+     * @param string $uri
289 289
      * @param $target
290 290
      *
291 291
      * @return boolean
Please login to merge, or discard this patch.
src/View/GenericViewHelper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
     /**
159 159
      * Get form error by input field
160 160
      * @param $field
161
-     * @return bool|string
161
+     * @return string|false
162 162
      */
163 163
     public function getFormError($field)
164 164
     {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
     public function render(string $template = "", array $variables = [])
54 54
     {
55 55
         $view = new ViewController();
56
-        $view->setTemplate( $template );
57
-        $view->setVariables( $variables );
56
+        $view->setTemplate($template);
57
+        $view->setVariables($variables);
58 58
         return $view->render();
59 59
     }
60 60
 
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function renderBlock(string $name, string $default = "")
101 101
     {
102
-        if($this->view->getVariable($name) == null) {
102
+        if ($this->view->getVariable($name) == null) {
103 103
             return $default;
104 104
         }
105
-        return trim($this->view->getVariable( $name ));
105
+        return trim($this->view->getVariable($name));
106 106
     }
107 107
 
108 108
     /**
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function escape(string $string)
114 114
     {
115
-        return stripslashes( strip_tags( $string ) );
115
+        return stripslashes(strip_tags($string));
116 116
     }
117 117
 
118 118
     /**
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
 
138 138
         }
139 139
 
140
-        $files = $this->view->getVariable('assets'.ucfirst($type));
140
+        $files = $this->view->getVariable('assets' . ucfirst($type));
141 141
 
142 142
         foreach ($files AS $file) {
143
-            $result .= sprintf($pattern, $file). "\n";
143
+            $result .= sprintf($pattern, $file) . "\n";
144 144
         }
145 145
 
146 146
         return $result;
Please login to merge, or discard this patch.
src/View/ViewController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
     /**
108 108
      * Get a single variable
109 109
      * @param $key
110
-     * @return boolean|string|array
110
+     * @return string
111 111
      */
112 112
     public function getVariable(string $key)
113 113
     {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,19 +24,19 @@  discard block
 block discarded – undo
24 24
      * Holds the view variables
25 25
      * @var array
26 26
      */
27
-    private $variable           = [];
27
+    private $variable = [];
28 28
 
29 29
     /**
30 30
      * Holds the view template
31 31
      * @var string
32 32
      */
33
-    private $template           = "";
33
+    private $template = "";
34 34
 
35 35
     /**
36 36
      * Holds the parent template
37 37
      * @var ViewController
38 38
      */
39
-    private $extendedTemplate   = null;
39
+    private $extendedTemplate = null;
40 40
 
41 41
     /**
42 42
      * Set template for this view
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function getTemplate()
93 93
     {
94
-        return (string) $this->template;
94
+        return (string)$this->template;
95 95
     }
96 96
 
97 97
     /**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function getVariable(string $key)
113 113
     {
114
-        if(isset($this->variable[$key])) {
114
+        if (isset($this->variable[$key])) {
115 115
             return $this->variable[$key];
116 116
         }
117 117
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function hasVariable(string $key)
127 127
     {
128
-        if(isset($this->variable[$key])) {
128
+        if (isset($this->variable[$key])) {
129 129
             return true;
130 130
         }
131 131
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public function setVariables(array $variables = [])
141 141
     {
142
-        foreach($variables AS $key=>$value) {
142
+        foreach ($variables AS $key=>$value) {
143 143
             $this->setVariable($key, $value);
144 144
         }
145 145
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
         ob_end_clean();
204 204
 
205
-        if( $this->getExtendedTemplate() instanceof ViewController ) {
205
+        if ($this->getExtendedTemplate() instanceof ViewController) {
206 206
             return $this->cleanOutput($this->getExtendedTemplate()->setVariables($this->getVariables())->render());
207 207
         } else {
208 208
             return $this->cleanOutput($content);
@@ -251,8 +251,8 @@  discard block
 block discarded – undo
251 251
      */
252 252
     public function __destruct()
253 253
     {
254
-        unset( $this->variable );
255
-        unset( $this->template );
254
+        unset($this->variable);
255
+        unset($this->template);
256 256
     }
257 257
 
258 258
 }
259 259
\ No newline at end of file
Please login to merge, or discard this patch.
src/Http/Uri.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         if (in_array($code, array_keys(Response::HTTP_STATUS_CODES))) {
29 29
 
30 30
             header('HTTP/2 ' . $code . ' ' . Response::HTTP_STATUS_CODES[$code]);
31
-            header('Location: ' .  $location);
31
+            header('Location: ' . $location);
32 32
             return $this->terminate();
33 33
 
34 34
         }
Please login to merge, or discard this patch.