Completed
Push — develop ( 9f16e6...3b316f )
by Schlaefer
02:38
created
plugins/BbcodeParser/src/Lib/jBBCode/Visitors/JbbCodeAutolinkVisitor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
             }
70 70
         }
71 71
         krsort($names);
72
-        $baseUrl = $this->_sOptions->get('webroot') . $this->_sOptions->get('atBaseUrl');
72
+        $baseUrl = $this->_sOptions->get('webroot').$this->_sOptions->get('atBaseUrl');
73 73
         foreach ($names as $name => $v) {
74 74
             $title = urlencode($name);
75 75
             $link = $this->_url(
76
-                $baseUrl . $title,
76
+                $baseUrl.$title,
77 77
                 "@$name",
78 78
                 false
79 79
             );
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
      */
93 93
     protected function _autolink($string)
94 94
     {
95
-        $replace = function ($matches) {
95
+        $replace = function($matches) {
96 96
             // exclude punctuation at end of sentence from URLs
97 97
             $ignoredEndChars = implode('|', [',', '\?', ',', '\.', '\)', '!']);
98 98
             preg_match(
99
-                '/(?P<element>.*?)(?P<suffix>' . $ignoredEndChars . ')?$/',
99
+                '/(?P<element>.*?)(?P<suffix>'.$ignoredEndChars.')?$/',
100 100
                 $matches['element'],
101 101
                 $m
102 102
             );
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $matches = $m + $matches;
105 105
 
106 106
             if (strpos($matches['element'], '://') === false) {
107
-                $matches['element'] = 'http://' . $matches['element'];
107
+                $matches['element'] = 'http://'.$matches['element'];
108 108
             }
109 109
             $matches += [
110 110
                 'prefix' => '',
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                 true
119 119
             );
120 120
 
121
-            return $matches['prefix'] . $url . $matches['suffix'];
121
+            return $matches['prefix'].$url.$matches['suffix'];
122 122
         };
123 123
 
124 124
         //# autolink http://urls
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         //# autolink email
139 139
         $string = preg_replace_callback(
140 140
             "#(?<=^|[\n ])(?P<content>([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+))#i",
141
-            function ($matches) {
141
+            function($matches) {
142 142
                 return $this->_email($matches['content']);
143 143
             },
144 144
             $string
@@ -156,13 +156,13 @@  discard block
 block discarded – undo
156 156
      */
157 157
     protected function _hashLink($string)
158 158
     {
159
-        $baseUrl = $this->_sOptions->get('webroot') . $this->_sOptions->get('hashBaseUrl');
159
+        $baseUrl = $this->_sOptions->get('webroot').$this->_sOptions->get('hashBaseUrl');
160 160
         $string = preg_replace_callback(
161 161
             '/(?<=\s|^|])(?<tag>#)(?<element>\d+)(?!\w)/',
162
-            function ($m) use ($baseUrl) {
162
+            function($m) use ($baseUrl) {
163 163
                 $hash = $m['element'];
164 164
 
165
-                return $this->_url($baseUrl . $hash, '#' . $hash);
165
+                return $this->_url($baseUrl.$hash, '#'.$hash);
166 166
             },
167 167
             $string
168 168
         );
Please login to merge, or discard this patch.
plugins/BbcodeParser/src/Lib/jBBCode/Definitions/JbbCodeCodeDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         // load config from app/Config/geshi.php
25 25
         $this->Geshi->features = false;
26 26
 
27
-        $string = '<div class="geshi-wrapper"><pre lang="' . $type . '">' . $content . '</pre></div>';
27
+        $string = '<div class="geshi-wrapper"><pre lang="'.$type.'">'.$content.'</pre></div>';
28 28
 
29 29
         $string = $this->Geshi->highlight($string);
30 30
 
Please login to merge, or discard this patch.
plugins/BbcodeParser/src/Lib/jBBCode/Definitions/JbbCodeDefinitions.php 1 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.
BbcodeParser/src/Lib/jBBCode/Definitions/JbbHtml5MediaCodeDefinition.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $out = "<audio src='$content' controls='controls'>";
29 29
         $out .= Message::format(
30 30
             __(
31
-                'Your browser does not support HTML5 audio. Please updgrade to a modern ' .
31
+                'Your browser does not support HTML5 audio. Please updgrade to a modern '.
32 32
                 'browser. In order to watch this stream you need an HTML5 capable browser.',
33 33
                 true
34 34
             )
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
     protected function _video($content)
49 49
     {
50 50
         // fix audio files mistakenly wrapped into an [video] tag
51
-        if (preg_match('/(' . implode('|', self::$_html5AudioExtensions) . ')$/i', $content) === 1) {
51
+        if (preg_match('/('.implode('|', self::$_html5AudioExtensions).')$/i', $content) === 1) {
52 52
             return $this->_audio($content);
53 53
         }
54 54
 
55 55
         $out = "<video src='$content' controls='controls' x-webkit-airplay='allow'>";
56 56
         $out .= Message::format(
57 57
             __(
58
-                'Your browser does not support HTML5 video. Please updgrade to a modern ' .
58
+                'Your browser does not support HTML5 video. Please updgrade to a modern '.
59 59
                 'browser. In order to watch this stream you need an HTML5 capable browser.',
60 60
                 true
61 61
             )
Please login to merge, or discard this patch.
plugins/MailObfuscator/src/View/Helper/MailObfuscatorHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
         if (empty($title) === false) {
30 30
             $hasTitle = 1;
31 31
         }
32
-        $rand = "moh_" . md5(mt_rand(1, 10000) . $addr);
32
+        $rand = "moh_".md5(mt_rand(1, 10000).$addr);
33 33
         list($ttl, $dom) = explode('@', $addr);
34 34
 
35 35
         // missing  style='unicode-bidi:bidi-override;direction:rtl;'
36
-        $mailto = '<a id="' . $rand . '" href="#" data-ttl="' . $ttl . '" data-dom="' . $dom . '">' . $title . '</a>';
36
+        $mailto = '<a id="'.$rand.'" href="#" data-ttl="'.$ttl.'" data-dom="'.$dom.'">'.$title.'</a>';
37 37
         $mailto .= '<noscript><p>[You need to have Javascript enabled to see this mail address.]</p></noscript>';
38 38
         $mailto .= $this->Html->scriptBlock(
39 39
             "$(function(){
Please login to merge, or discard this patch.
plugins/Stopwatch/src/View/Helper/StopwatchHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 /**
5 5
  * Saito - The Threaded Web Forum
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function html(): string
38 38
     {
39
-        $memory = 'Peak memory usage: ' . $this->Number->toReadableSize(memory_get_peak_usage());
39
+        $memory = 'Peak memory usage: '.$this->Number->toReadableSize(memory_get_peak_usage());
40 40
         $html = $this->Html->para('', $memory);
41 41
 
42 42
         $html .= $this->Html->tag(
@@ -117,6 +117,6 @@  discard block
 block discarded – undo
117 117
      */
118 118
     private function getResult()
119 119
     {
120
-        return "<pre>" . Stopwatch::getString() . "</pre>";
120
+        return "<pre>".Stopwatch::getString()."</pre>";
121 121
     }
122 122
 }
Please login to merge, or discard this patch.
plugins/Stopwatch/src/Lib/Stopwatch.php 1 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.
plugins/Cron/src/Lib/Cron.php 1 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/Installer/tests/TestCase/Controller/UpdaterControllerTest.php 1 patch
Spacing   +5 added lines, -5 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
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     public function setUp()
36 36
     {
37 37
         parent::setUp();
38
-        $this->token = new File(CONFIG . 'updater');
38
+        $this->token = new File(CONFIG.'updater');
39 39
         $this->dbVersion = (new DbVersion(TableRegistry::get('Settings')));
40 40
         Configure::write('Saito.updated', false);
41 41
     }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         $this->assertResponseOk();
56 56
         $this->assertEquals('failure', $this->_controller->viewBuilder()->getTemplate());
57
-        $this->assertResponseContains((string)1529737182);
57
+        $this->assertResponseContains((string) 1529737182);
58 58
     }
59 59
 
60 60
     public function testUpdaterShowFailureNoDbVersionString()
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         $this->assertResponseOk();
66 66
         $this->assertEquals('failure', $this->_controller->viewBuilder()->getTemplate());
67
-        $this->assertResponseContains((string)1529737397);
67
+        $this->assertResponseContains((string) 1529737397);
68 68
     }
69 69
 
70 70
     public function testUpdaterShowFailureWrongDbVersionString()
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         $this->assertResponseOk();
76 76
         $this->assertEquals('failure', $this->_controller->viewBuilder()->getTemplate());
77
-        $this->assertResponseContains((string)1529737648);
77
+        $this->assertResponseContains((string) 1529737648);
78 78
     }
79 79
 
80 80
     public function testUpdaterInitMigrationsFormEmpty()
Please login to merge, or discard this patch.