Passed
Push — master ( 2a966a...079cce )
by y
01:17
created
src/Site/Request.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
                         $info['tmp_name'][$i]
62 62
                     );
63 63
                 }
64
-            }
65
-            else {
64
+            } else {
66 65
                 $this->files[$name] = new Upload(
67 66
                     $info['error_code'],
68 67
                     $info['name'],
Please login to merge, or discard this patch.
src/Site/Auth.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
         if (!isset($_SESSION['_token'])) {
28 28
             try {
29 29
                 $_SESSION['_token'] = bin2hex(random_bytes(8));
30
-            }
31
-            catch (Exception $exception) {
30
+            } catch (Exception $exception) {
32 31
                 $_SESSION['_token'] = bin2hex(openssl_random_pseudo_bytes(8));
33 32
             }
34 33
         }
Please login to merge, or discard this patch.
src/Site/Response.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -124,8 +124,7 @@  discard block
 block discarded – undo
124 124
         $template = __DIR__ . '/error.phtml';
125 125
         if (file_exists("view/{$code}.phtml")) {
126 126
             $template = "view/{$code}.phtml";
127
-        }
128
-        elseif (file_exists('view/error.phtml')) {
127
+        } elseif (file_exists('view/error.phtml')) {
129 128
             $template = 'view/error.phtml';
130 129
         }
131 130
         $this->view(new View($template, [
@@ -322,8 +321,7 @@  discard block
 block discarded – undo
322 321
     public function setTimestamp (int $timestamp) {
323 322
         if ($timestamp) {
324 323
             $this['Last-Modified'] = gmdate('D, d M Y H:i:s T', $timestamp);
325
-        }
326
-        else {
324
+        } else {
327 325
             unset($this['Last-Modified']);
328 326
         }
329 327
         $this->timestamp = $timestamp;
Please login to merge, or discard this patch.
src/Site.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,8 +56,7 @@  discard block
 block discarded – undo
56 56
     public function _onException (Throwable $error): void {
57 57
         if (!$error instanceof Error) {
58 58
             $this->log(500, "[{$error->getCode()}] {$error}");
59
-        }
60
-        elseif ($error->getCode() >= 500) {
59
+        } elseif ($error->getCode() >= 500) {
61 60
             $this->log($error->getCode(), $error);
62 61
         }
63 62
         $this->response->error($error) and exit;
@@ -190,8 +189,7 @@  discard block
 block discarded – undo
190 189
         $match = [];
191 190
         if ($path[0] !== '/') {
192 191
             preg_match($path, $this->request->getPath(), $match);
193
-        }
194
-        elseif ($path === $this->request->getPath()) {
192
+        } elseif ($path === $this->request->getPath()) {
195 193
             $match = [$path];
196 194
         }
197 195
         if ($match) {
Please login to merge, or discard this patch.