Completed
Push — master ( 3c1969...5b5792 )
by Schlaefer
03:16 queued 10s
created
config/bootstrap.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 /*
17 17
  * Configure paths required to find CakePHP + general filepath constants
18 18
  */
19
-require __DIR__ . '/paths.php';
19
+require __DIR__.'/paths.php';
20 20
 
21 21
 /*
22 22
  * Bootstrap CakePHP.
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  * - Registering the CakePHP autoloader.
28 28
  * - Setting the default application paths.
29 29
  */
30
-require CORE_PATH . 'config' . DS . 'bootstrap.php';
30
+require CORE_PATH.'config'.DS.'bootstrap.php';
31 31
 
32 32
 use Cake\Cache\Cache;
33 33
 use Cake\Console\ConsoleErrorHandler;
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
  * You should copy `config/.env.default to `config/.env` and set/modify the
52 52
  * variables as required.
53 53
  */
54
-if (!env('APP_NAME') && file_exists(CONFIG . '.env')) {
55
-    $dotenv = new \josegonzalez\Dotenv\Loader([CONFIG . '.env']);
54
+if (!env('APP_NAME') && file_exists(CONFIG.'.env')) {
55
+    $dotenv = new \josegonzalez\Dotenv\Loader([CONFIG.'.env']);
56 56
     $dotenv->parse()
57 57
         ->putenv()
58 58
         ->toEnv()
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * Load additional config files
76 76
      */
77 77
     Configure::load('saito_config', 'default');
78
-    Configure::config('saitoCore', new PhpConfig(APP . '/Lib/'));
78
+    Configure::config('saitoCore', new PhpConfig(APP.'/Lib/'));
79 79
     Configure::load('version', 'saitoCore');
80 80
 
81 81
     Configure::write(
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
     Configure::load('email', 'default');
87 87
 } catch (\Exception $e) {
88
-    exit($e->getMessage() . "\n");
88
+    exit($e->getMessage()."\n");
89 89
 }
90 90
 
91 91
 /*
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
  * Include the CLI bootstrap overrides.
138 138
  */
139 139
 if ($isCli) {
140
-    require __DIR__ . '/bootstrap_cli.php';
140
+    require __DIR__.'/bootstrap_cli.php';
141 141
 }
142 142
 
143 143
 /*
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
     $httpHost = env('HTTP_HOST');
156 156
     if (isset($httpHost)) {
157
-        Configure::write('App.fullBaseUrl', 'http' . $s . '://' . $httpHost);
157
+        Configure::write('App.fullBaseUrl', 'http'.$s.'://'.$httpHost);
158 158
     }
159 159
     unset($httpHost, $s);
160 160
 }
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
 /*
177 177
  * Setup detectors for mobile and tablet.
178 178
  */
179
-ServerRequest::addDetector('mobile', function ($request) {
179
+ServerRequest::addDetector('mobile', function($request) {
180 180
     $detector = new \Detection\MobileDetect();
181 181
 
182 182
     return $detector->isMobile();
183 183
 });
184
-ServerRequest::addDetector('tablet', function ($request) {
184
+ServerRequest::addDetector('tablet', function($request) {
185 185
     $detector = new \Detection\MobileDetect();
186 186
 
187 187
     return $detector->isTablet();
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 Inflector::rules('plural', ['/^(smil)ey$/i' => '\1ies']);
221 221
 Inflector::rules('singular', ['/^(smil)ies$/i' => '\1ey']);
222 222
 
223
-include Cake\Core\App::path('Lib')[0] . 'BaseFunctions.php';
223
+include Cake\Core\App::path('Lib')[0].'BaseFunctions.php';
224 224
 
225 225
 \Cake\Event\EventManager::instance()->on(\Saito\Event\SaitoEventManager::getInstance());
226 226
 
Please login to merge, or discard this patch.
plugins/Admin/src/View/Helper/AdminHelper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         $options += ['class' => ''];
101 101
         // set breadcrumb item class for Bootstrap
102
-        $options['class'] = $options['class'] . ' breadcrumb-item';
102
+        $options['class'] = $options['class'].' breadcrumb-item';
103 103
         // last item in breadcrump is current (active) page and not linked
104 104
         if ($url === false) {
105 105
             // set breadcrumb active item class for Bootstrap
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             PREG_SPLIT_NO_EMPTY
128 128
         );
129 129
         if (empty($errors)) {
130
-            return '<p>' . __('No log file found.') . '</p>';
130
+            return '<p>'.__('No log file found.').'</p>';
131 131
         }
132 132
 
133 133
         $out = '';
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
             $_i = self::tagId();
139 139
             $_details = $e->details();
140 140
             if (!empty($_details)) {
141
-                $out .= '<button class="btn btn-mini" style="float:right;" onclick="$(\'#' . $_i . '\').toggle(); return false;">' . __(
141
+                $out .= '<button class="btn btn-mini" style="float:right;" onclick="$(\'#'.$_i.'\').toggle(); return false;">'.__(
142 142
                     'Details'
143
-                ) . '</button>' . "\n";
143
+                ).'</button>'."\n";
144 144
             }
145
-            $out .= '<pre style="font-size: 10px;">' . "\n";
145
+            $out .= '<pre style="font-size: 10px;">'."\n";
146 146
             $out .= '<div class="row"><div class="span2" style="text-align: right">';
147 147
             $out .= $this->TimeH->formatTime($e->time(), 'eng');
148 148
 
@@ -150,12 +150,12 @@  discard block
 block discarded – undo
150 150
             $out .= '<div class="span7">';
151 151
             $out .= $e->message();
152 152
             if (!empty($_details)) {
153
-                $out .= '<span id="' . $_i . '" style="display: none;">' . "\n";
153
+                $out .= '<span id="'.$_i.'" style="display: none;">'."\n";
154 154
                 $out .= $_details;
155 155
                 $out .= '</span>';
156 156
             }
157 157
             $out .= '</div></div>';
158
-            $out .= '</pre>' . "\n";
158
+            $out .= '</pre>'."\n";
159 159
             if ($k++ > $_nErrorsToShow) {
160 160
                 break;
161 161
             }
Please login to merge, or discard this patch.
plugins/Admin/src/Lib/CakeLogEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Saito - The Threaded Web Forum
Please login to merge, or discard this patch.
src/View/Helper/LayoutHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $html = "<i class=\"saito-icon fa fa-{$icon}\"></i>";
66 66
         if (!empty($text)) {
67
-                $html .= '&nbsp;<span class="saito-icon-text">' . $text . '</span>';
67
+                $html .= '&nbsp;<span class="saito-icon-text">'.$text.'</span>';
68 68
         }
69 69
 
70 70
         return $html;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function dropdownMenuButton(array $menuItems, array $options = [])
81 81
     {
82 82
         $options += ['class' => 'btn btn-primary'];
83
-        $options['class'] = $options['class'] . ' dropdown-toggle';
83
+        $options['class'] = $options['class'].' dropdown-toggle';
84 84
         $menu = [];
85 85
         foreach ($menuItems as $menuItem) {
86 86
             if ($menuItem === 'divider') {
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         $contentArray += ['first' => '', 'middle' => '', 'last' => ''];
174 174
         $out = '';
175 175
         foreach (['first', 'middle', 'last'] as $key) {
176
-            $out .= '<div class="' . $key . '">';
176
+            $out .= '<div class="'.$key.'">';
177 177
             $out .= $options['escape'] ? h($contentArray[$key]) : $contentArray[$key];
178 178
             $out .= '</div>';
179 179
         }
Please login to merge, or discard this patch.
src/Controller/UsersController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         }
235 235
         $code = $this->request->getQuery('c');
236 236
         try {
237
-            $activated = $this->Users->activate((int)$id, $code);
237
+            $activated = $this->Users->activate((int) $id, $code);
238 238
         } catch (\Exception $e) {
239 239
             $activated = false;
240 240
         }
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
     public function ignore()
293 293
     {
294 294
         $this->request->allowMethod('POST');
295
-        $blockedId = (int)$this->request->getData('id');
295
+        $blockedId = (int) $this->request->getData('id');
296 296
         $this->_ignore($blockedId, true);
297 297
     }
298 298
 
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
     public function unignore()
305 305
     {
306 306
         $this->request->allowMethod('POST');
307
-        $blockedId = (int)$this->request->getData('id');
307
+        $blockedId = (int) $this->request->getData('id');
308 308
         $this->_ignore($blockedId, false);
309 309
     }
310 310
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
     protected function _ignore($blockedId, $set)
319 319
     {
320 320
         $userId = $this->CurrentUser->getId();
321
-        if ((int)$userId === (int)$blockedId) {
321
+        if ((int) $userId === (int) $blockedId) {
322 322
             throw new BadRequestException();
323 323
         }
324 324
         if ($set) {
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
         $user = $this->Users->find()
380 380
             ->contain(
381 381
                 [
382
-                    'UserBlocks' => function ($q) {
382
+                    'UserBlocks' => function($q) {
383 383
                         return $q->find('assocUsers');
384 384
                     },
385 385
                     'UserOnline'
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
             throw new BadRequestException;
541 541
         }
542 542
 
543
-        $id = (int)$this->request->getData('lockUserId');
543
+        $id = (int) $this->request->getData('lockUserId');
544 544
         if (!$this->Users->exists($id)) {
545 545
             throw new NotFoundException('User does not exist.', 1524298280);
546 546
         }
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
             $this->Flash->set($message, ['element' => 'error']);
555 555
         } else {
556 556
             try {
557
-                $duration = (int)$this->request->getData('lockPeriod');
557
+                $duration = (int) $this->request->getData('lockPeriod');
558 558
                 $blocker = new ManualBlocker($this->CurrentUser->getId(), $duration);
559 559
                 $status = $this->Users->UserBlocks->block($blocker, $id);
560 560
                 if (!$status) {
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
         $allowed = $this->Slidetabs->getAvailable();
680 680
         $order = array_filter(
681 681
             $order,
682
-            function ($item) use ($allowed) {
682
+            function($item) use ($allowed) {
683 683
                 return in_array($item, $allowed);
684 684
             }
685 685
         );
Please login to merge, or discard this patch.
src/Lib/Saito/Posting/Decorator/AbstractPostingDecorator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
             return call_user_func_array([$this->_Posting, $method], $args);
36 36
         }
37 37
         throw new \RuntimeException(
38
-            'Undefined method ' . get_class($this) . '::' . $method
38
+            'Undefined method '.get_class($this).'::'.$method
39 39
         );
40 40
     }
41 41
 
Please login to merge, or discard this patch.
src/Lib/Saito/User/Blocker/BlockerAbstract.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Saito - The Threaded Web Forum
Please login to merge, or discard this patch.
src/Lib/Saito/User/Blocker/ManualBlocker.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Saito - The Threaded Web Forum
@@ -70,6 +70,6 @@  discard block
 block discarded – undo
70 70
 
71 71
         $entity = $this->Table->newEntity($conditions);
72 72
 
73
-        return (bool)$this->Table->save($entity);
73
+        return (bool) $this->Table->save($entity);
74 74
     }
75 75
 }
Please login to merge, or discard this patch.
src/Lib/Saito/Exception/SaitoBlackholeException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function __construct($type = null, $data = [])
14 14
     {
15
-        $message = 'Request was blackholed. Type: ' . $type;
15
+        $message = 'Request was blackholed. Type: '.$type;
16 16
         $logger = new ExceptionLogger;
17 17
         $logger->write($message, $data);
18 18
         parent::__construct($message, 400);
Please login to merge, or discard this patch.