Completed
Push — master ( 7161cd...80db05 )
by Schlaefer
14s
created
plugins/Admin/src/Controller/CategoriesController.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * add new category
37 37
      *
38
-     * @return \Cake\Network\Response|void
38
+     * @return \Cake\Http\Response|null
39 39
      */
40 40
     public function add()
41 41
     {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * edit category
67 67
      *
68 68
      * @param string $id category-ID
69
-     * @return \Cake\Network\Response|void
69
+     * @return \Cake\Http\Response|null
70 70
      */
71 71
     public function edit($id)
72 72
     {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      *
107 107
      * @param string $id category-ID
108 108
      *
109
-     * @return \Cake\Network\Response|void
109
+     * @return \Cake\Http\Response|null
110 110
      */
111 111
     public function delete($id)
112 112
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
 
124 124
         switch ($this->request->getData('mode')) {
125 125
             case ('move'):
126
-                $targetId = (int)$this->request->getData('targetCategory');
126
+                $targetId = (int) $this->request->getData('targetCategory');
127 127
                 try {
128 128
                     $this->Categories->merge($category->get('id'), $targetId);
129 129
                     $this->Flash->set(
Please login to merge, or discard this patch.
plugins/Admin/src/Controller/SettingsController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
      *
90 90
      * @param null $id settings-ID
91 91
      *
92
-     * @return \Cake\Network\Response|void
92
+     * @return \Cake\Http\Response|null
93 93
      */
94 94
     public function edit($id = null)
95 95
     {
Please login to merge, or discard this 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.
plugins/Admin/src/Controller/UsersController.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     /**
46 46
      * add user
47 47
      *
48
-     * @return \Cake\Network\Response|void
48
+     * @return \Cake\Http\Response|null
49 49
      */
50 50
     public function add()
51 51
     {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * delete user
69 69
      *
70 70
      * @param string $id user-ID
71
-     * @return \Cake\Network\Response|void
71
+     * @return \Cake\Http\Response|null
72 72
      */
73 73
     public function delete($id)
74 74
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
      */
73 73
     public function delete($id)
74 74
     {
75
-        $id = (int)$id;
75
+        $id = (int) $id;
76 76
         $exists = $this->Users->exists($id);
77 77
         if (!$exists) {
78 78
             $this->Flash->set(__('User not found.'), ['element' => 'error']);
Please login to merge, or discard this patch.
plugins/BbcodeParser/src/Lib/jBBCode/Definitions/JbbCodeDefinitions.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -566,6 +566,7 @@
 block discarded – undo
566 566
 
567 567
     /**
568 568
      * {@inheritDoc}
569
+     * @param string $content
569 570
      */
570 571
     protected function _getUrl($content, $attributes)
571 572
     {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             return $this->Html->link($url, $url, ['target' => '_blank']);
72 72
         }
73 73
 
74
-        $loader = function () use ($url) {
74
+        $loader = function() use ($url) {
75 75
             $embed = ['url' => $url];
76 76
 
77 77
             try {
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
         $callable = \Closure::fromCallable($loader);
109 109
 
110
-        $uid = 'embed-' . md5($url);
110
+        $uid = 'embed-'.md5($url);
111 111
         $info = Cache::remember($uid, $callable, 'bbcodeParserEmbed');
112 112
 
113 113
         return $this->_sHelper->Html->div('js-embed', '', ['id' => $uid, 'data-embed' => json_encode($info)]);
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         }
187 187
 
188 188
         $ad = explode('|', $this->_sOptions->get('video_domains_allowed'));
189
-        $trim = function ($v) {
189
+        $trim = function($v) {
190 190
             return trim($v);
191 191
         };
192 192
         $this->_allowedVideoDomains = array_fill_keys(array_map($trim, $ad), 1);
@@ -271,9 +271,9 @@  discard block
 block discarded – undo
271 271
             }
272 272
         }
273 273
 
274
-        $out = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="' . $width . '" height="' . $height . '">
275
-									<param name="movie" value="' . $url . '"></param>
276
-									<embed src="' . $url . '" width="' . $width . '" height="' . $height . '" type="application/x-shockwave-flash" wmode="opaque" style="width:' . $width . 'px; height:' . $height . 'px;" id="VideoPlayback" flashvars=""> </embed> </object>';
274
+        $out = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'.$width.'" height="'.$height.'">
275
+									<param name="movie" value="' . $url.'"></param>
276
+									<embed src="' . $url.'" width="'.$width.'" height="'.$height.'" type="application/x-shockwave-flash" wmode="opaque" style="width:'.$width.'px; height:'.$height.'px;" id="VideoPlayback" flashvars=""> </embed> </object>';
277 277
 
278 278
         return $out;
279 279
     }
@@ -359,12 +359,12 @@  discard block
 block discarded – undo
359 359
     {
360 360
         $listPieces = explode('[*]', $content);
361 361
         unset($listPieces[0]);
362
-        $listPieceProcessor = function ($li) {
363
-            return '<li>' . $li . '</li>' . "\n";
362
+        $listPieceProcessor = function($li) {
363
+            return '<li>'.$li.'</li>'."\n";
364 364
         };
365 365
         $listPieces = array_map($listPieceProcessor, $listPieces);
366 366
 
367
-        return '<ul>' . implode('', $listPieces) . '</ul>';
367
+        return '<ul>'.implode('', $listPieces).'</ul>';
368 368
     }
369 369
 }
370 370
 
@@ -386,14 +386,14 @@  discard block
 block discarded – undo
386 386
         }
387 387
 
388 388
         $title = $this->_mbStrpad(
389
-            ' ' . __('Spoiler') . ' ',
389
+            ' '.__('Spoiler').' ',
390 390
             $length,
391 391
             '▇',
392 392
             STR_PAD_BOTH
393 393
         );
394 394
 
395 395
         $json = json_encode(['string' => $content]);
396
-        $id = 'spoiler_' . rand(0, 9999999999999);
396
+        $id = 'spoiler_'.rand(0, 9999999999999);
397 397
 
398 398
         $out = <<<EOF
399 399
 <div class="richtext-spoiler" style="display: inline;">
@@ -441,18 +441,18 @@  discard block
 block discarded – undo
441 441
         $result = null;
442 442
         $repeat = ceil($strLen - $padStrLen + $padLen);
443 443
         if ($dir == STR_PAD_RIGHT) {
444
-            $result = $str . str_repeat($padStr, $repeat);
444
+            $result = $str.str_repeat($padStr, $repeat);
445 445
             $result = mb_substr($result, 0, $padLen);
446 446
         } else {
447 447
             if ($dir == STR_PAD_LEFT) {
448
-                $result = str_repeat($padStr, $repeat) . $str;
448
+                $result = str_repeat($padStr, $repeat).$str;
449 449
                 $result = mb_substr($result, -$padLen);
450 450
             } else {
451 451
                 if ($dir == STR_PAD_BOTH) {
452 452
                     $length = ($padLen - $strLen) / 2;
453 453
                     $repeat = ceil($length / $padStrLen);
454
-                    $result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length)) .
455
-                        $str .
454
+                    $result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length)).
455
+                        $str.
456 456
                         mb_substr(str_repeat($padStr, $repeat), 0, ceil($length));
457 457
                 }
458 458
             }
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             'fullBase' => true,
488 488
         ];
489 489
 
490
-        $url = '/useruploads/' . $content;
490
+        $url = '/useruploads/'.$content;
491 491
         $image = $this->_sHelper->Html->image($url, $params);
492 492
 
493 493
         if ($node->getParent()->getTagName() === 'Document') {
Please login to merge, or discard this patch.
plugins/BbcodeParser/src/Lib/Parser.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      * Constructor
209 209
      *
210 210
      * @param Helper $Helper helper
211
-     * @param array $settings settings
211
+     * @param MarkupSettings $settings settings
212 212
      */
213 213
     public function __construct(Helper $Helper, MarkupSettings $settings)
214 214
     {
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      * - `multimedia` bool true|false parse or ignore multimedia content
226 226
      * - `embed` bool true|false parse or ignore embed content
227 227
      *
228
-     * @return mixed|string
228
+     * @return string
229 229
      */
230 230
     public function parse($string, array $options = [])
231 231
     {
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
      * Add definitin set
316 316
      *
317 317
      * @param string $set set
318
-     * @param array $options options
318
+     * @param MarkupSettings $options options
319 319
      *
320 320
      * @return void
321 321
      * @throws \Exception
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 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
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         // serializing complex objects kills PHP
282 282
         $serializable = array_filter(
283 283
             $options,
284
-            function ($value) {
284
+            function($value) {
285 285
                 return !is_object($value);
286 286
             }
287 287
         );
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
                     $this->_Parser->addCodeDefinition($builder->build());
336 336
                     break;
337 337
                 case 'class':
338
-                    $class = '\Plugin\BbcodeParser\src\Lib\jBBCode\Definitions\\' . ucfirst($title);
338
+                    $class = '\Plugin\BbcodeParser\src\Lib\jBBCode\Definitions\\'.ucfirst($title);
339 339
                     $this->_Parser->addCodeDefinition(new $class($this->_Helper, $options));
340 340
                     break;
341 341
                 default:
@@ -355,10 +355,10 @@  discard block
 block discarded – undo
355 355
             return;
356 356
         }
357 357
 
358
-        $folder = __DIR__ . '/jBBCode/Definitions/';
359
-        require_once $folder . 'JbbCodeDefinitions.php';
360
-        require_once $folder . 'JbbHtml5MediaCodeDefinition.php';
361
-        require_once $folder . 'JbbCodeCodeDefinition.php';
358
+        $folder = __DIR__.'/jBBCode/Definitions/';
359
+        require_once $folder.'JbbCodeDefinitions.php';
360
+        require_once $folder.'JbbHtml5MediaCodeDefinition.php';
361
+        require_once $folder.'JbbCodeCodeDefinition.php';
362 362
 
363 363
         $this->areCombinedClassFilesLoaded = true;
364 364
     }
Please login to merge, or discard this patch.
plugins/Cron/src/Lib/Cron.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
      *
138 138
      * @param string $msg message
139 139
      *
140
-     * @return bool
140
+     * @return boolean|null
141 141
      */
142 142
     protected function _log($msg)
143 143
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
             }
75 75
             $jobsExecuted++;
76 76
             $job->execute();
77
-            $this->_log('Run cron-job ' . $job->uid);
77
+            $this->_log('Run cron-job '.$job->uid);
78 78
             $this->_lastRuns[$job->due][$job->uid] = $this->_now;
79 79
         }
80 80
         if ($jobsExecuted === 0) {
Please login to merge, or discard this patch.
plugins/Feeds/src/View/Helper/FeedsHelper.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     /**
50 50
      * Get RssWriter feed
51 51
      *
52
-     * @return Channel
52
+     * @return Feed
53 53
      */
54 54
     public function getFeed(): Feed
55 55
     {
Please login to merge, or discard this patch.
plugins/Sitemap/src/Lib/SitemapGenerator.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     /**
45 45
      * @param string $file filename
46
-     * @return mixed
46
+     * @return false|string
47 47
      */
48 48
     public function content($file)
49 49
     {
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     /**
95 95
      * Creates name for sitemap-file
96 96
      *
97
-     * @param array $params additional name parameters
97
+     * @param integer[] $params additional name parameters
98 98
      * @return string
99 99
      */
100 100
     protected function _filename($params = [])
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
     {
102 102
         $filename = "sitemap-{$this->_type}";
103 103
         if ($params) {
104
-            $filename .= '-' . implode('-', $params);
104
+            $filename .= '-'.implode('-', $params);
105 105
         }
106 106
 
107 107
         return $filename;
Please login to merge, or discard this patch.
plugins/Stopwatch/src/Lib/Stopwatch.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     /**
168 168
      * time to Cake start
169 169
      *
170
-     * @return mixed
170
+     * @return double
171 171
      */
172 172
     protected static function _timeToCake()
173 173
     {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     /**
178 178
      * time from cake to stopwatch
179 179
      *
180
-     * @return int
180
+     * @return double
181 181
      */
182 182
     protected static function _timeFromCakeToStopwatch()
183 183
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -141,10 +141,10 @@  discard block
 block discarded – undo
141 141
 
142 142
         switch ($event) {
143 143
             case 'start':
144
-                $x = '* ' . $x;
144
+                $x = '* '.$x;
145 145
                 break;
146 146
             case 'stop':
147
-                $x = '† ' . $x;
147
+                $x = '† '.$x;
148 148
                 break;
149 149
         }
150 150
 
@@ -208,13 +208,13 @@  discard block
 block discarded – undo
208 208
         self::start('now');
209 209
 
210 210
         $out = "";
211
-        $out .= 'Time to Cake: ' . sprintf('%05.3f', self::_timeToCake()) . " s\n";
212
-        $out .= 'Cake bootstrap: ' . sprintf('%05.3f', self::_timeFromCakeToStopwatch()) . " s\n";
211
+        $out .= 'Time to Cake: '.sprintf('%05.3f', self::_timeToCake())." s\n";
212
+        $out .= 'Cake bootstrap: '.sprintf('%05.3f', self::_timeFromCakeToStopwatch())." s\n";
213 213
 
214 214
         $out .= "W\tU\tW_delta\tU_delta\tMem [MB]\n";
215 215
         $_seriesIndex = 1;
216 216
         foreach (self::$_events as $k => $v) {
217
-            $out .= '<span id="stopwatch-' . $_seriesIndex++ . '" class="stopwatch-row">';
217
+            $out .= '<span id="stopwatch-'.$_seriesIndex++.'" class="stopwatch-row">';
218 218
             $out .= sprintf(
219 219
                 "%05.3f\t%05.3f\t%05.3f\t%05.3f\t%5.1f\t%s\n",
220 220
                 $v['wtime'],
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
             );
266 266
         }
267 267
 
268
-        $out .= "\n\n" . self::printStatistic();
268
+        $out .= "\n\n".self::printStatistic();
269 269
 
270 270
         return $out;
271 271
     }
@@ -354,10 +354,10 @@  discard block
 block discarded – undo
354 354
      */
355 355
     public static function printStatistic()
356 356
     {
357
-        return self::$_stopwatchCalls . " calls with ca " . sprintf(
357
+        return self::$_stopwatchCalls." calls with ca ".sprintf(
358 358
             "%05.3f",
359 359
             self::$_stopwatchTime
360
-        ) . ' sec overhead.';
360
+        ).' sec overhead.';
361 361
     }
362 362
 
363 363
     /**
Please login to merge, or discard this patch.