Completed
Push — 4.0 ( a1234e...3b08f9 )
by Marco
03:21
created
src/Comodojo/Dispatcher/Components/CacheManager.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,9 @@
 block discarded – undo
64 64
 
65 65
                     $handler = $this->getHandler($provider, $parameters);
66 66
 
67
-                    if ( $handler instanceof CacheInterface ) $manager->addProvider($handler);
67
+                    if ( $handler instanceof CacheInterface ) {
68
+                        $manager->addProvider($handler);
69
+                    }
68 70
 
69 71
                 }
70 72
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,25 +35,25 @@  discard block
 block discarded – undo
35 35
 
36 36
         $cache = $this->configuration->get('cache');
37 37
 
38
-        if ( empty($cache) ) {
38
+        if (empty($cache)) {
39 39
 
40 40
             $manager = new ComodojoCacheManager(self::getAlgorithm(), $this->logger);
41 41
 
42 42
         } else {
43 43
 
44
-            $enabled = ( empty($cache['enabled']) || $cache['enabled'] === true ) ? true : false;
44
+            $enabled = (empty($cache['enabled']) || $cache['enabled'] === true) ? true : false;
45 45
 
46
-            $algorithm = self::getAlgorithm( empty($cache['algorithm']) ? null : $cache['algorithm']);
46
+            $algorithm = self::getAlgorithm(empty($cache['algorithm']) ? null : $cache['algorithm']);
47 47
 
48 48
             $manager = new ComodojoCacheManager($algorithm, $this->logger);
49 49
 
50
-            if ( $enabled && !empty($cache['providers']) ) {
50
+            if ($enabled && !empty($cache['providers'])) {
51 51
 
52 52
                 foreach ($cache['providers'] as $provider => $parameters) {
53 53
 
54 54
                     $handler = $this->getHandler($provider, $parameters);
55 55
 
56
-                    if ( $handler instanceof CacheInterface ) $manager->addProvider($handler);
56
+                    if ($handler instanceof CacheInterface) $manager->addProvider($handler);
57 57
 
58 58
                 }
59 59
 
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
 
81 81
     protected function getHandler($provider, $parameters) {
82 82
 
83
-        switch ( strtolower($parameters['type']) ) {
83
+        switch (strtolower($parameters['type'])) {
84 84
 
85 85
             case 'filecache':
86 86
 
87 87
                 $base = $this->configuration->get('base-path');
88 88
 
89
-                if ( empty($parameters['folder']) ||  empty($base) ) {
89
+                if (empty($parameters['folder']) || empty($base)) {
90 90
                     $this->logger->warning("Wrong cache provider, disabling $provider", $parameters);
91 91
                     break;
92 92
                 }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
             case 'memcached':
101 101
 
102
-                if ( empty($parameters['host']) ) {
102
+                if (empty($parameters['host'])) {
103 103
                     $this->logger->warning("Wrong cache provider, disabling $provider", $parameters);
104 104
                     break;
105 105
                 }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     protected static function getAlgorithm($algorithm = null) {
134 134
 
135
-        switch ( strtoupper($algorithm) ) {
135
+        switch (strtoupper($algorithm)) {
136 136
 
137 137
             case 'PICK_LAST':
138 138
                 $selected = ComodojoCacheManager::PICK_LAST;
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Components/EventsManager.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
         $callable = $this->convertToListener($class, $event);
49 49
 
50
-        if ( $callable === false ) return null;
50
+        if ($callable === false) return null;
51 51
 
52 52
         return $this->addListener($event, $callable, $priority);
53 53
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
         $callable = $this->convertToListener($class, $event);
59 59
 
60
-        if ( $callable === false ) return null;
60
+        if ($callable === false) return null;
61 61
 
62 62
         return $this->addOneTimeListener($event, $callable, $priority);
63 63
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     protected function convertToListener($class, $event) {
67 67
 
68
-        if ( !class_exists($class) ) {
68
+        if (!class_exists($class)) {
69 69
 
70 70
             $this->logger->error("Cannot subscribe class $class to event $event: cannot find class");
71 71
 
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
 
92 92
     public function load($plugins) {
93 93
 
94
-        if ( !empty($plugins) ) {
94
+        if (!empty($plugins)) {
95 95
 
96
-            foreach( $plugins as $name => $plugin ) {
96
+            foreach ($plugins as $name => $plugin) {
97 97
 
98
-                if ( !isset($plugin['class']) || !isset($plugin["event"]) ) {
98
+                if (!isset($plugin['class']) || !isset($plugin["event"])) {
99 99
 
100 100
                     $this->logger->error("Invalid plugin definition", $plugin);
101 101
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 $priority = isset($plugin['priority']) ? $plugin['priority'] : 0;
107 107
                 $onetime = isset($plugin['onetime']) ? $plugin['onetime'] : 0;
108 108
 
109
-                if ( $onetime ) $this->subscribeOnce($plugin['event'], $plugin['class'], $priority);
109
+                if ($onetime) $this->subscribeOnce($plugin['event'], $plugin['class'], $priority);
110 110
                 else $this->subscribe($plugin['event'], $plugin['class'], $priority);
111 111
 
112 112
             }
Please login to merge, or discard this patch.
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,9 @@  discard block
 block discarded – undo
47 47
 
48 48
         $callable = $this->convertToListener($class, $event);
49 49
 
50
-        if ( $callable === false ) return null;
50
+        if ( $callable === false ) {
51
+            return null;
52
+        }
51 53
 
52 54
         return $this->addListener($event, $callable, $priority);
53 55
 
@@ -57,7 +59,9 @@  discard block
 block discarded – undo
57 59
 
58 60
         $callable = $this->convertToListener($class, $event);
59 61
 
60
-        if ( $callable === false ) return null;
62
+        if ( $callable === false ) {
63
+            return null;
64
+        }
61 65
 
62 66
         return $this->addOneTimeListener($event, $callable, $priority);
63 67
 
@@ -106,8 +110,11 @@  discard block
 block discarded – undo
106 110
                 $priority = isset($plugin['priority']) ? $plugin['priority'] : 0;
107 111
                 $onetime = isset($plugin['onetime']) ? $plugin['onetime'] : 0;
108 112
 
109
-                if ( $onetime ) $this->subscribeOnce($plugin['event'], $plugin['class'], $priority);
110
-                else $this->subscribe($plugin['event'], $plugin['class'], $priority);
113
+                if ( $onetime ) {
114
+                    $this->subscribeOnce($plugin['event'], $plugin['class'], $priority);
115
+                } else {
116
+                    $this->subscribe($plugin['event'], $plugin['class'], $priority);
117
+                }
111 118
 
112 119
             }
113 120
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Router/Table.php 2 patches
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -84,10 +84,11 @@  discard block
 block discarded – undo
84 84
 
85 85
         $regex = $this->regex($route);
86 86
 
87
-        if (isset($this->routes[$regex]))
88
-            return $this->routes[$regex];
89
-        else
90
-            return null;
87
+        if (isset($this->routes[$regex])) {
88
+                    return $this->routes[$regex];
89
+        } else {
90
+                    return null;
91
+        }
91 92
 
92 93
     }
93 94
 
@@ -157,11 +158,15 @@  discard block
 block discarded – undo
157 158
     
158 159
     private function readCache() {
159 160
         
160
-        if ( $this->configuration()->get('routing-table-cache') !== true ) return;
161
+        if ( $this->configuration()->get('routing-table-cache') !== true ) {
162
+            return;
163
+        }
161 164
         
162 165
         $routes = $this->cache->setNamespace('dispatcher-internals')->get("dispatcher-routes");
163 166
         
164
-        if (is_null($routes)) return;
167
+        if (is_null($routes)) {
168
+            return;
169
+        }
165 170
         
166 171
         foreach ($routes as $name => $data) {
167 172
             
@@ -177,7 +182,9 @@  discard block
 block discarded – undo
177 182
     
178 183
     private function dumpCache() {
179 184
         
180
-        if ( $this->configuration()->get('routing-table-cache') !== true ) return;
185
+        if ( $this->configuration()->get('routing-table-cache') !== true ) {
186
+            return;
187
+        }
181 188
         
182 189
         $ttl = $this->configuration()->get('routing-table-ttl');
183 190
         
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
 
118 118
     public function load($routes) {
119 119
 
120
-        if ( !empty($routes) ) {
120
+        if (!empty($routes)) {
121 121
 
122
-            foreach( $routes as $name => $route ) {
122
+            foreach ($routes as $name => $route) {
123 123
 
124 124
                 $this->add($route['route'], $route['type'], $route['class'], $route['parameters']);
125 125
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
     private function readCache() {
137 137
 
138
-        if ( $this->configuration()->get('routing-table-cache') !== true ) return;
138
+        if ($this->configuration()->get('routing-table-cache') !== true) return;
139 139
 
140 140
         $this->routes = $this->cache->setNamespace('dispatcherinternals')->get("dispatcher-routes");
141 141
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
     private function dumpCache() {
149 149
 
150
-        if ( $this->configuration()->get('routing-table-cache') !== true ) return;
150
+        if ($this->configuration()->get('routing-table-cache') !== true) return;
151 151
 
152 152
         $ttl = $this->configuration()->get('routing-table-ttl');
153 153
 
@@ -166,14 +166,14 @@  discard block
 block discarded – undo
166 166
             ->setClassName($class) // Class to be invoked
167 167
             ->setParameters($parameters); // Parameters passed via the composer.json configuration (cache, ttl, etc...)
168 168
 
169
-        $this->logger->debug("ROUTE: " . implode("/", $folders));
169
+        $this->logger->debug("ROUTE: ".implode("/", $folders));
170 170
 
171 171
         //$this->logger->debug("PARAMETERS: " . var_export($value, true));
172 172
 
173 173
         // This method generate a global regular expression which will be able to match all the URI supported by the route
174 174
         $regex = $this->parser->read($folders, $route);
175 175
 
176
-        $this->logger->debug("ROUTE: " . $regex);
176
+        $this->logger->debug("ROUTE: ".$regex);
177 177
 
178 178
         //$this->logger->debug("PARAMETERS: " . var_export($value, true));
179 179
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Router/Model.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
 
109 109
         $methods = $this->configuration->get('allowed-http-methods');
110 110
 
111
-        if ( ( $methods != null || !empty($methods) ) && in_array($method, $methods) === false ) {
111
+        if (($methods != null || !empty($methods)) && in_array($method, $methods) === false) {
112 112
 
113 113
             throw new DispatcherException("Method not allowed", 0, null, 405, array(
114
-                "Allow" => implode(",",$methods)
114
+                "Allow" => implode(",", $methods)
115 115
             ));
116 116
 
117 117
         }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             
139 139
         }
140 140
         
141
-        if ( $this->bypass_service ) {
141
+        if ($this->bypass_service) {
142 142
             
143 143
             return;
144 144
             
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
             $methods = $service->getImplementedMethods();
160 160
 
161
-            if ( in_array($method, $methods) ) {
161
+            if (in_array($method, $methods)) {
162 162
 
163 163
                 $callable = $service->getMethod($method);
164 164
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         foreach ($this->table->routes() as $regex => $value) {
202 202
             
203 203
             // The current uri is checked against all the global regular expressions associated with the routes
204
-            if (preg_match("/" . $regex . "/", $path, $matches)) {
204
+            if (preg_match("/".$regex."/", $path, $matches)) {
205 205
 
206 206
                 /* If a route is matched, all the bits of the route string are evalued in order to create
207 207
                  * new query parameters which will be available for the service class
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,9 @@  discard block
 block discarded – undo
105 105
 
106 106
         if (!$this->bypass_routing) {
107 107
 
108
-            if (!$this->parse()) throw new DispatcherException("Unable to find a valid route for the specified uri", 0, null, 404);
108
+            if (!$this->parse()) {
109
+                throw new DispatcherException("Unable to find a valid route for the specified uri", 0, null, 404);
110
+            }
109 111
 
110 112
         }
111 113
 
@@ -133,8 +135,9 @@  discard block
 block discarded – undo
133 135
                 $this->extra
134 136
             );
135 137
 
138
+        } else {
139
+            return null;
136 140
         }
137
-        else return null;
138 141
         
139 142
     }
140 143
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Components/LogManager.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,9 @@  discard block
 block discarded – undo
65 65
 
66 66
                 $handler = $this->getHandler($provider, $parameters);
67 67
 
68
-                if ( $handler instanceof HandlerInterface ) $logger->pushHandler($handler);
68
+                if ( $handler instanceof HandlerInterface ) {
69
+                    $logger->pushHandler($handler);
70
+                }
69 71
 
70 72
             }
71 73
 
@@ -112,7 +114,9 @@  discard block
 block discarded – undo
112 114
                 
113 115
             case 'SyslogHandler':
114 116
                 
115
-                if ( empty($parameters['ident']) ) return null;
117
+                if ( empty($parameters['ident']) ) {
118
+                    return null;
119
+                }
116 120
                 
117 121
                 $facility = empty($parameters['facility']) ? LOG_USER : $parameters['facility'];
118 122
             
@@ -211,7 +215,9 @@  discard block
 block discarded – undo
211 215
     
212 216
     protected static function getFilePermission($filepermission = null) {
213 217
         
214
-        if ( is_null($filepermission) ) return null;
218
+        if ( is_null($filepermission) ) {
219
+            return null;
220
+        }
215 221
         
216 222
         return filter_var($bubble, FILTER_VALIDATE_INT, array(
217 223
             'options' => array(
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@  discard block
 block discarded – undo
47 47
 
48 48
         if (
49 49
             empty($log) ||
50
-            ( isset($log['enabled']) && $log['enabled'] === false ) ||
50
+            (isset($log['enabled']) && $log['enabled'] === false) ||
51 51
             empty($log['providers'])
52 52
         ) {
53 53
 
54 54
             $logger = new Logger('dispatcher');
55 55
 
56
-            $logger->pushHandler( new NullHandler( self::getLevel() ) );
56
+            $logger->pushHandler(new NullHandler(self::getLevel()));
57 57
 
58 58
         } else {
59 59
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
                 $handler = $this->getHandler($provider, $parameters);
67 67
 
68
-                if ( $handler instanceof HandlerInterface ) $logger->pushHandler($handler);
68
+                if ($handler instanceof HandlerInterface) $logger->pushHandler($handler);
69 69
 
70 70
             }
71 71
 
@@ -92,19 +92,19 @@  discard block
 block discarded – undo
92 92
 
93 93
     protected function getHandler($provider, $parameters) {
94 94
 
95
-        switch ( $parameters['type'] ) {
95
+        switch ($parameters['type']) {
96 96
 
97 97
             case 'StreamHandler':
98 98
 
99 99
                 $stream = $this->configuration->get('base-path').'/'.(empty($parameters['stream']) ? 'dispatcher.log' : $parameters['stream']);
100 100
 
101
-                $level = self::getLevel( empty($parameters['level']) ? null : $parameters['level'] );
101
+                $level = self::getLevel(empty($parameters['level']) ? null : $parameters['level']);
102 102
 
103
-                $bubble = self::getBubble( empty($parameters['bubble']) ? true : $parameters['bubble'] );
103
+                $bubble = self::getBubble(empty($parameters['bubble']) ? true : $parameters['bubble']);
104 104
 
105
-                $filePermission = self::getFilePermission( empty($parameters['filePermission']) ? null : $parameters['filePermission'] );
105
+                $filePermission = self::getFilePermission(empty($parameters['filePermission']) ? null : $parameters['filePermission']);
106 106
 
107
-                $useLocking = self::getLocking( empty($parameters['useLocking']) ? false : $parameters['useLocking'] );
107
+                $useLocking = self::getLocking(empty($parameters['useLocking']) ? false : $parameters['useLocking']);
108 108
 
109 109
                 $handler = new StreamHandler($stream, $level, $bubble, $filePermission, $useLocking);
110 110
 
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
 
113 113
             case 'SyslogHandler':
114 114
 
115
-                if ( empty($parameters['ident']) ) return null;
115
+                if (empty($parameters['ident'])) return null;
116 116
 
117 117
                 $facility = empty($parameters['facility']) ? LOG_USER : $parameters['facility'];
118 118
 
119
-                $level = self::getLevel( empty($parameters['level']) ? null : $parameters['level'] );
119
+                $level = self::getLevel(empty($parameters['level']) ? null : $parameters['level']);
120 120
 
121
-                $bubble = self::getBubble( empty($parameters['bubble']) ? true : $parameters['bubble'] );
121
+                $bubble = self::getBubble(empty($parameters['bubble']) ? true : $parameters['bubble']);
122 122
 
123 123
                 $logopts = empty($parameters['logopts']) ? LOG_PID : $parameters['logopts'];
124 124
 
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
 
131 131
                 $messageType = empty($parameters['messageType']) ? ErrorLogHandler::OPERATING_SYSTEM : $parameters['messageType'];
132 132
 
133
-                $level = self::getLevel( empty($parameters['level']) ? null : $parameters['level'] );
133
+                $level = self::getLevel(empty($parameters['level']) ? null : $parameters['level']);
134 134
 
135
-                $bubble = self::getBubble( empty($parameters['bubble']) ? true : $parameters['bubble'] );
135
+                $bubble = self::getBubble(empty($parameters['bubble']) ? true : $parameters['bubble']);
136 136
 
137
-                $expandNewlines = self::getExpandNewlines( empty($parameters['expandNewlines']) ? false : $parameters['expandNewlines'] );
137
+                $expandNewlines = self::getExpandNewlines(empty($parameters['expandNewlines']) ? false : $parameters['expandNewlines']);
138 138
 
139 139
                 $handler = new ErrorLogHandler($messageType, $level, $bubble, $expandNewlines);
140 140
 
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     protected static function getLevel($level = null) {
160 160
 
161
-        switch ( strtoupper($level) ) {
161
+        switch (strtoupper($level)) {
162 162
 
163 163
             case 'INFO':
164 164
                 $logger_level = Logger::INFO;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
     protected static function getFilePermission($filepermission = null) {
213 213
 
214
-        if ( is_null($filepermission) ) return null;
214
+        if (is_null($filepermission)) return null;
215 215
 
216 216
         return filter_var($filepermission, FILTER_VALIDATE_INT, array(
217 217
             'options' => array(
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Components/DefaultConfiguration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
48 48
 
49 49
     private static function urlGetAbsolute() {
50 50
 
51
-        $http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '') . '://';
51
+        $http = 'http'.((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '').'://';
52 52
 
53 53
         $uri = self::uriGetAbsolute();
54 54
 
55
-        return ( $http . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost') . $uri . "/" );
55
+        return ($http.(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost').$uri."/");
56 56
 
57 57
     }
58 58
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Response/Preprocessor/Status301.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,9 @@
 block discarded – undo
32 32
 
33 33
         $location = $this->response()->location()->get();
34 34
 
35
-        if ( empty($location) ) throw new Exception("Invalid location, cannot redirect");
35
+        if ( empty($location) ) {
36
+            throw new Exception("Invalid location, cannot redirect");
37
+        }
36 38
 
37 39
         $this->response()->headers()->set("Location: ".$location);
38 40
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
 
33 33
         $location = $this->response->location->get();
34 34
 
35
-        if ( empty($location) ) throw new Exception("Invalid location, cannot redirect");
35
+        if (empty($location)) throw new Exception("Invalid location, cannot redirect");
36 36
 
37 37
         $this->response->headers->set("Location: ".$location);
38 38
 
39
-        if ( empty($this->response->content->get()) ) {
39
+        if (empty($this->response->content->get())) {
40 40
 
41 41
             $this->response->content->set(sprintf('<!DOCTYPE html>
42 42
 <html>
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Response/Preprocessor/Status405.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         // An Allow Header should be provided from DispatcherException
34 34
         $allow = $this->response()->headers()->get('Allow');
35 35
 
36
-        if ( is_null($allow) ) throw new Exception("Missing Allow header");
36
+        if (is_null($allow)) throw new Exception("Missing Allow header");
37 37
 
38 38
         parent::consolidate();
39 39
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@
 block discarded – undo
33 33
         // An Allow Header should be provided from DispatcherException
34 34
         $allow = $this->response()->headers()->get('Allow');
35 35
 
36
-        if ( is_null($allow) ) throw new Exception("Missing Allow header");
36
+        if ( is_null($allow) ) {
37
+            throw new Exception("Missing Allow header");
38
+        }
37 39
 
38 40
         parent::consolidate();
39 41
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Response/Preprocessor/Status200.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $type = $this->response()->content()->type();
34 34
         $charset = $this->response()->content()->charset();
35 35
 
36
-        if ( is_null($charset) ) {
36
+        if (is_null($charset)) {
37 37
             $this->response()->headers()->set("Content-type", strtolower($type));
38 38
         } else {
39 39
             $this->response()->headers()->set("Content-type", strtolower($type)."; charset=".$charset);
Please login to merge, or discard this patch.