Completed
Pull Request — master (#64)
by Josh
02:35
created
Zewa/View.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
         }
227 227
 
228 228
         foreach ($sheets as $sheet) {
229
-            $string .= '<link rel="stylesheet" href="' . $sheet .'">' . "\r\n";
229
+            $string .= '<link rel="stylesheet" href="' . $sheet . '">' . "\r\n";
230 230
         }
231 231
 
232 232
         return $string;
Please login to merge, or discard this patch.
Zewa/SessionHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         ini_set('session.cookie_domain', $domain);
33 33
 
34 34
         if ($session_lifetime != '' && is_integer($session_lifetime)) {
35
-            ini_set('session.gc_maxlifetime', (int) $session_lifetime);
35
+            ini_set('session.gc_maxlifetime', (int)$session_lifetime);
36 36
         }
37 37
 
38 38
         if ($gc_probability != '' && is_integer($gc_probability)) {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
         if ($interface !== 'file') {
80 80
             try {
81
-                $database = new Database();//App::getService('database')->fetchConnection();
81
+                $database = new Database(); //App::getService('database')->fetchConnection();
82 82
                 $this->dbh = $database->fetchConnection('default');
83 83
 
84 84
                 session_set_save_handler(
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     public function destroy($sessionId)
166 166
     {
167 167
         $success = false;
168
-        $query = "DELETE FROM ". $this->tableName
168
+        $query = "DELETE FROM " . $this->tableName
169 169
             . " WHERE id = ?";
170 170
 
171 171
         $success = $this->dbh->prepare($query)
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     public function gc()
182 182
     {
183 183
 
184
-        $query = "DELETE FROM ". $this->tableName
184
+        $query = "DELETE FROM " . $this->tableName
185 185
             . " WHERE session_expire < ?";
186 186
 
187 187
         return $this->dbh->prepare($query)
Please login to merge, or discard this patch.
Zewa/Request.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                 // iterate through all the entries
169 169
                 foreach ($this->flashdata as $variable => $data) {
170 170
                     // increment counter representing server requests
171
-                    $this->flashdata[$variable]['inc'] ++;
171
+                    $this->flashdata[$variable]['inc']++;
172 172
 
173 173
                     // if we're past the first server request
174 174
                     if ($this->flashdata[$variable]['inc'] > 1) {
@@ -342,9 +342,9 @@  discard block
 block discarded – undo
342 342
 
343 343
             if (is_numeric($data)) {
344 344
                 if ((intval($data) === (int)trim($data, '-')) && strlen((string)(int)$data) === strlen($data)) {
345
-                    $data = (int) $data;
345
+                    $data = (int)$data;
346 346
                 } elseif ($data === (string)(float)$data) {
347
-                    $data = (float) $data;
347
+                    $data = (float)$data;
348 348
                 }
349 349
             } else {
350 350
  //                $data = $this->purifier->purify($data);
@@ -362,12 +362,12 @@  discard block
 block discarded – undo
362 362
             $container = $name . 'Container';
363 363
             $container = $this->$container;
364 364
 
365
-            $argument = ! empty($arguments[0]) ? $arguments[0] : false;
365
+            $argument = !empty($arguments[0]) ? $arguments[0] : false;
366 366
 
367 367
             if ($argument === false && !empty($container)) {
368 368
                 return $container;
369 369
             }
370
-            if (! empty($container[$argument])) {
370
+            if (!empty($container[$argument])) {
371 371
                 if (!is_array($container[$argument])
372 372
                     && !is_object($container[$argument])
373 373
                     && strlen($container[$argument]) > 0
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
                 }
379 379
             }
380 380
 
381
-            return ! empty($arguments[1]) ? $arguments[1] : false;
381
+            return !empty($arguments[1]) ? $arguments[1] : false;
382 382
         }
383 383
 
384 384
         throw new Exception\FunctionException('Method ' . $name . ' does not exist.');
Please login to merge, or discard this patch.
Zewa/ServiceManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,15 +16,15 @@  discard block
 block discarded – undo
16 16
      */
17 17
     public function __construct()
18 18
     {
19
-        $database = function () {
19
+        $database = function() {
20 20
             return new Database();
21 21
         };
22 22
 
23
-        $router = function () {
23
+        $router = function() {
24 24
             return new Router();
25 25
         };
26 26
 
27
-        $request = function () {
27
+        $request = function() {
28 28
             return new Request();
29 29
         };
30 30
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     public function __get($property)
37 37
     {
38
-        if (! empty($this->services[$property])) {
38
+        if (!empty($this->services[$property])) {
39 39
             return $this->services[$property];
40 40
         }
41 41
         throw new Exception\LookupException('The service: ' . $property . ' hasn\'t been registered.');
Please login to merge, or discard this patch.
Zewa/App.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
     public function getConfiguration($config = null)
192 192
     {
193 193
         if ($config !== null) {
194
-            if (! empty($this->configuration->$config)) {
194
+            if (!empty($this->configuration->$config)) {
195 195
                 return $this->configuration->$config;
196 196
             }
197 197
 
Please login to merge, or discard this patch.
Zewa/Router.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     private function isURIClean($uri, $uriChunks)
125 125
     {
126 126
         if (!preg_match("/^[a-z0-9:_\/\.\[\]-]+$/i", $uri)
127
-            || array_filter($uriChunks, function ($uriChunk) {
127
+            || array_filter($uriChunks, function($uriChunk) {
128 128
                 if (strpos($uriChunk, '__') !== false) {
129 129
                     return true;
130 130
                 }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
         $normalizedURI = ltrim(preg_replace('/\?.*/', '', $normalizedURI), '/');
209 209
 
210
-        if (! empty($this->configuration->routes)) {
210
+        if (!empty($this->configuration->routes)) {
211 211
             $normalizedURI = $this->discoverRoute($normalizedURI);
212 212
         }
213 213
         
@@ -226,9 +226,9 @@  discard block
 block discarded – undo
226 226
 
227 227
                 $uri = $reroute;
228 228
 
229
-                if (! empty($params)) {
229
+                if (!empty($params)) {
230 230
                     $pat = '/(\$\d+)/';
231
-                    $uri = preg_replace_callback($pat, function () use (&$params) {
231
+                    $uri = preg_replace_callback($pat, function() use (&$params) {
232 232
                         $first = $params[0];
233 233
                         array_shift($params);
234 234
                         return $first;
Please login to merge, or discard this patch.
Zewa/Database.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     public function establishConnection($name = 'default')
32 32
     {
33 33
         if ($this->configuration !== false) {
34
-            if (! empty($this->configuration->$name)) {
34
+            if (!empty($this->configuration->$name)) {
35 35
                 $dbConfig = $this->configuration->$name;
36 36
                 self::$dbh[$name] = new \PDO($dbConfig->dsn, $dbConfig->user, $dbConfig->pass);
37 37
                 self::$dbh[$name]->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
Please login to merge, or discard this patch.