Completed
Push — master ( 3f0932...06785e )
by Flo
02:26
created
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.
src/Kernel.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Faulancer\Exception\DispatchFailureException;
13 13
 use Faulancer\Http\Request;
14 14
 use Faulancer\Service\Config;
15
-use Faulancer\ServiceLocator\ServiceLocator;
16 15
 
17 16
 /**
18 17
  * Class Kernel
Please login to merge, or discard this patch.
src/Console/ArgumentParser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,11 +50,11 @@
 block discarded – undo
50 50
 
51 51
             if (strpos($args[$i], '-') === false) {
52 52
                 continue;
53
-            } else if (empty($args[$i+1])) {
53
+            } else if (empty($args[$i + 1])) {
54 54
                 break;
55 55
             }
56 56
 
57
-            $this->set(str_replace('-', '', $args[$i]), $args[$i+1]);
57
+            $this->set(str_replace('-', '', $args[$i]), $args[$i + 1]);
58 58
 
59 59
         }
60 60
 
Please login to merge, or discard this patch.
src/View/ViewController.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@
 block discarded – undo
106 106
 
107 107
     /**
108 108
      * Get a single variable
109
-     * @param $key
110
-     * @return string|array
109
+     * @param string $key
110
+     * @return string
111 111
      */
112 112
     public function getVariable($key)
113 113
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function getVariable($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) :bool
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 = []) :self
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/View/GenericViewHelper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
     public function render($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
     /**
@@ -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.