@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace Plugin\BbcodeParser\src\Lib\jBBCode\Definitions; |
| 4 | 4 | |
| 5 | 5 | use Cake\Cache\Cache; |
| 6 | -use Cake\Core\Configure; |
|
| 7 | 6 | use Plugin\BbcodeParser\src\Lib\Helper\Message; |
| 8 | 7 | use Plugin\BbcodeParser\src\Lib\Helper\UrlParserTrait; |
| 9 | 8 | use Saito\DomainParser; |
@@ -71,7 +71,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -393,12 +393,12 @@ discard block |
||
| 393 | 393 | { |
| 394 | 394 | $listPieces = explode('[*]', $content); |
| 395 | 395 | unset($listPieces[0]); |
| 396 | - $listPieceProcessor = function ($li) { |
|
| 397 | - return '<li>' . $li . '</li>' . "\n"; |
|
| 396 | + $listPieceProcessor = function($li) { |
|
| 397 | + return '<li>'.$li.'</li>'."\n"; |
|
| 398 | 398 | }; |
| 399 | 399 | $listPieces = array_map($listPieceProcessor, $listPieces); |
| 400 | 400 | |
| 401 | - return '<ul>' . implode('', $listPieces) . '</ul>'; |
|
| 401 | + return '<ul>'.implode('', $listPieces).'</ul>'; |
|
| 402 | 402 | } |
| 403 | 403 | } |
| 404 | 404 | |
@@ -420,14 +420,14 @@ discard block |
||
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | $title = $this->_mbStrpad( |
| 423 | - ' ' . __('Spoiler') . ' ', |
|
| 423 | + ' '.__('Spoiler').' ', |
|
| 424 | 424 | $length, |
| 425 | 425 | '▇', |
| 426 | 426 | STR_PAD_BOTH |
| 427 | 427 | ); |
| 428 | 428 | |
| 429 | 429 | $json = json_encode(['string' => $content]); |
| 430 | - $id = 'spoiler_' . rand(0, 9999999999999); |
|
| 430 | + $id = 'spoiler_'.rand(0, 9999999999999); |
|
| 431 | 431 | |
| 432 | 432 | $out = <<<EOF |
| 433 | 433 | <div class="richtext-spoiler" style="display: inline;"> |
@@ -475,18 +475,18 @@ discard block |
||
| 475 | 475 | $result = null; |
| 476 | 476 | $repeat = ceil($strLen - $padStrLen + $padLen); |
| 477 | 477 | if ($dir == STR_PAD_RIGHT) { |
| 478 | - $result = $str . str_repeat($padStr, $repeat); |
|
| 478 | + $result = $str.str_repeat($padStr, $repeat); |
|
| 479 | 479 | $result = mb_substr($result, 0, $padLen); |
| 480 | 480 | } else { |
| 481 | 481 | if ($dir == STR_PAD_LEFT) { |
| 482 | - $result = str_repeat($padStr, $repeat) . $str; |
|
| 482 | + $result = str_repeat($padStr, $repeat).$str; |
|
| 483 | 483 | $result = mb_substr($result, -$padLen); |
| 484 | 484 | } else { |
| 485 | 485 | if ($dir == STR_PAD_BOTH) { |
| 486 | 486 | $length = ($padLen - $strLen) / 2; |
| 487 | 487 | $repeat = ceil($length / $padStrLen); |
| 488 | - $result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length)) . |
|
| 489 | - $str . |
|
| 488 | + $result = mb_substr(str_repeat($padStr, $repeat), 0, floor($length)). |
|
| 489 | + $str. |
|
| 490 | 490 | mb_substr(str_repeat($padStr, $repeat), 0, ceil($length)); |
| 491 | 491 | } |
| 492 | 492 | } |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | $attributes['img'] = $attributes['width']; |
| 518 | 518 | } |
| 519 | 519 | if (!empty($attributes['height'])) { |
| 520 | - $attributes['img'] .= 'x' . $attributes['height']; |
|
| 520 | + $attributes['img'] .= 'x'.$attributes['height']; |
|
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | return parent::_parse($content, $attributes, $node); |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | { |
| 46 | 46 | parent::setUp(); |
| 47 | 47 | |
| 48 | - $this->file = new File(TMP . 'my new-upload.png'); |
|
| 48 | + $this->file = new File(TMP.'my new-upload.png'); |
|
| 49 | 49 | $this->mockMediaFile($this->file); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $this->loginJwt(1); |
| 73 | 73 | |
| 74 | 74 | $this->upload($this->file); |
| 75 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
| 75 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
| 76 | 76 | |
| 77 | 77 | $this->assertResponseCode(200); |
| 78 | 78 | |
@@ -114,12 +114,12 @@ discard block |
||
| 114 | 114 | { |
| 115 | 115 | $this->loginJwt(1); |
| 116 | 116 | |
| 117 | - $this->file = new File(TMP . 'tmp_svg.svg'); |
|
| 117 | + $this->file = new File(TMP.'tmp_svg.svg'); |
|
| 118 | 118 | $this->file->write('<?xml version="1.0" encoding="UTF-8" ?> |
| 119 | 119 | <svg width="9" height="9" style="background:red;"></svg>'); |
| 120 | 120 | $this->upload($this->file); |
| 121 | 121 | |
| 122 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
| 122 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
| 123 | 123 | |
| 124 | 124 | $this->assertResponseCode(200); |
| 125 | 125 | |
@@ -159,12 +159,12 @@ discard block |
||
| 159 | 159 | { |
| 160 | 160 | $this->loginJwt(1); |
| 161 | 161 | unset($this->file); |
| 162 | - $this->file = new File(TMP . 'tmp_exif.jpg'); |
|
| 162 | + $this->file = new File(TMP.'tmp_exif.jpg'); |
|
| 163 | 163 | |
| 164 | - $fixture = new File($path = Plugin::path('ImageUploader') . 'tests/Fixture/exif-with-location.jpg'); |
|
| 164 | + $fixture = new File($path = Plugin::path('ImageUploader').'tests/Fixture/exif-with-location.jpg'); |
|
| 165 | 165 | $fixture->copy($this->file->path); |
| 166 | 166 | |
| 167 | - $readExif = function (File $file) { |
|
| 167 | + $readExif = function(File $file) { |
|
| 168 | 168 | //@codingStandardsIgnoreStart |
| 169 | 169 | return @exif_read_data($file->path); |
| 170 | 170 | //@codingStandardsIgnoreEnd |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | $this->upload($this->file); |
| 178 | 178 | |
| 179 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
| 179 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
| 180 | 180 | |
| 181 | 181 | $this->assertResponseCode(200); |
| 182 | 182 | |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | $this->get('api/v2/uploads'); |
| 238 | 238 | |
| 239 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
| 239 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
| 240 | 240 | |
| 241 | 241 | $this->assertResponseCode(200); |
| 242 | 242 | |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | |
| 284 | 284 | $this->delete('api/v2/uploads/1'); |
| 285 | 285 | |
| 286 | - $response = json_decode((string)$this->_response->getBody(), true); |
|
| 286 | + $response = json_decode((string) $this->_response->getBody(), true); |
|
| 287 | 287 | |
| 288 | 288 | $this->assertResponseCode(204); |
| 289 | 289 | |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | 0 => [ |
| 312 | 312 | 'file' => [ |
| 313 | 313 | 'tmp_name' => $file->path, |
| 314 | - 'name' => $file->name() . '.' . $this->file->ext(), |
|
| 314 | + 'name' => $file->name().'.'.$this->file->ext(), |
|
| 315 | 315 | 'size' => $file->size(), |
| 316 | 316 | 'type' => $file->mime(), |
| 317 | 317 | ] |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $Uploads = TableRegistry::get('ImageUploader.Uploads'); |
| 34 | 34 | $upload = $Uploads->get(1); |
| 35 | 35 | |
| 36 | - $file = new File(Configure::read('Saito.Settings.uploadDirectory') . $upload->get('name')); |
|
| 36 | + $file = new File(Configure::read('Saito.Settings.uploadDirectory').$upload->get('name')); |
|
| 37 | 37 | $raw = (new SimpleImage()) |
| 38 | 38 | ->fromNew(500, 500, 'blue') |
| 39 | 39 | ->toString($upload->get('type')); |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $this->assertFalse(Cache::read($upload->get('id'), $cacheKey)); |
| 49 | 49 | |
| 50 | - $this->get('/api/v2/uploads/thumb/1?h=' . $upload->get('hash')); |
|
| 50 | + $this->get('/api/v2/uploads/thumb/1?h='.$upload->get('hash')); |
|
| 51 | 51 | |
| 52 | 52 | $cache = Cache::read($upload->get('id'), $cacheKey); |
| 53 | 53 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $this->assertSame(300, imagesx($image)); |
| 56 | 56 | $this->assertSame(300, imagesy($image)); |
| 57 | 57 | $this->assertSame($upload->get('type'), $cache['type']); |
| 58 | - $this->assertResponseEquals($cache['raw'], (string)$this->_response->getBody()); |
|
| 58 | + $this->assertResponseEquals($cache['raw'], (string) $this->_response->getBody()); |
|
| 59 | 59 | $this->assertHeader('content-type', 'image/png'); |
| 60 | 60 | |
| 61 | 61 | //// cleanup |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $Uploads = TableRegistry::get('ImageUploader.Uploads'); |
| 75 | 75 | $upload = $Uploads->get(1); |
| 76 | 76 | |
| 77 | - $file = new File(Configure::read('Saito.Settings.uploadDirectory') . $upload->get('name')); |
|
| 77 | + $file = new File(Configure::read('Saito.Settings.uploadDirectory').$upload->get('name')); |
|
| 78 | 78 | $raw = (new SimpleImage()) |
| 79 | 79 | ->fromNew(100, 100, 'blue') |
| 80 | 80 | ->toString($upload->get('type')); |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | $UploaderConfig = Configure::read('Saito.Settings.uploader'); |
| 87 | 87 | $nMax = $UploaderConfig->getMaxNumberOfUploadsPerUser(); |
| 88 | 88 | $rules->add( |
| 89 | - function (Upload $entity, array $options) use ($nMax) { |
|
| 89 | + function(Upload $entity, array $options) use ($nMax) { |
|
| 90 | 90 | $count = $this->findByUserId($entity->get('user_id'))->count(); |
| 91 | 91 | |
| 92 | 92 | return $count < $nMax; |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | private function convertToJpeg(File $file): File |
| 194 | 194 | { |
| 195 | - $jpeg = new File($file->folder()->path . DS . $file->name() . '.jpg'); |
|
| 195 | + $jpeg = new File($file->folder()->path.DS.$file->name().'.jpg'); |
|
| 196 | 196 | |
| 197 | 197 | try { |
| 198 | 198 | (new SimpleImage()) |
@@ -247,8 +247,8 @@ discard block |
||
| 247 | 247 | $ratio = $size / $target; |
| 248 | 248 | $ratio = sqrt($ratio); |
| 249 | 249 | |
| 250 | - $newwidth = (int)($width / $ratio); |
|
| 251 | - $newheight = (int)($height / $ratio); |
|
| 250 | + $newwidth = (int) ($width / $ratio); |
|
| 251 | + $newheight = (int) ($height / $ratio); |
|
| 252 | 252 | $destination = imagecreatetruecolor($newwidth, $newheight); |
| 253 | 253 | |
| 254 | 254 | $source = imagecreatefromstring($raw); |
@@ -1,6 +1,6 @@ discard block |
||
| 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,8 +35,8 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function thumb(): Response |
| 37 | 37 | { |
| 38 | - $id = (int)$this->request->getParam('id'); |
|
| 39 | - ['hash' => $fingerprint, 'type' => $type, 'raw' => $raw] = Cache::remember((string)$id, function () use ($id) { |
|
| 38 | + $id = (int) $this->request->getParam('id'); |
|
| 39 | + ['hash' => $fingerprint, 'type' => $type, 'raw' => $raw] = Cache::remember((string) $id, function() use ($id) { |
|
| 40 | 40 | $Uploads = $this->loadModel('ImageUploader.Uploads'); |
| 41 | 41 | $document = $Uploads->get($id); |
| 42 | 42 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | return compact('hash', 'raw', 'type'); |
| 56 | 56 | }, Configure::read('Saito.Settings.uploader')->getCacheKey()); |
| 57 | 57 | |
| 58 | - $hash = (string)$this->request->getQuery('h'); |
|
| 58 | + $hash = (string) $this->request->getQuery('h'); |
|
| 59 | 59 | if ($hash !== $fingerprint) { |
| 60 | 60 | throw new SaitoForbiddenException( |
| 61 | 61 | "Attempt to access image-thumbnail $id." |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | $parts = explode('.', $submitted['name']); |
| 60 | 60 | $ext = array_pop($parts); |
| 61 | - $name = $this->CurrentUser->getId() . |
|
| 62 | - '_' . |
|
| 63 | - substr(Security::hash($submitted['name'], 'sha256'), 32) . |
|
| 64 | - '.' . |
|
| 61 | + $name = $this->CurrentUser->getId(). |
|
| 62 | + '_'. |
|
| 63 | + substr(Security::hash($submitted['name'], 'sha256'), 32). |
|
| 64 | + '.'. |
|
| 65 | 65 | $ext; |
| 66 | 66 | $data = [ |
| 67 | 67 | 'document' => $submitted, |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | throw new GenericApiException($msg); |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - Cache::delete((string)$imageId, 'uploadsThumbnails'); |
|
| 106 | + Cache::delete((string) $imageId, 'uploadsThumbnails'); |
|
| 107 | 107 | |
| 108 | 108 | $this->autoRender = false; |
| 109 | 109 | $this->response = $this->response->withStatus(204); |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | 'title' => $image->get('title') ?: $image->get('name'), |
| 45 | 45 | 'size' => $image->get('size'), |
| 46 | 46 | 'url' => $this->Url->assetUrl( |
| 47 | - 'useruploads/' . $image->get('name'), |
|
| 47 | + 'useruploads/'.$image->get('name'), |
|
| 48 | 48 | ['fullBase' => true] |
| 49 | 49 | ), |
| 50 | 50 | 'thumbnail_url' => $this->Url->build( |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | public function setDefaultMaxFileSize($number): self |
| 64 | 64 | { |
| 65 | 65 | if (is_string($number)) { |
| 66 | - $number = (int)Text::parseFileSize($number, $this->defaultSize); |
|
| 66 | + $number = (int) Text::parseFileSize($number, $this->defaultSize); |
|
| 67 | 67 | } |
| 68 | 68 | if (!is_int($number)) { |
| 69 | 69 | throw new \InvalidArgumentException( |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | if ($size === null) { |
| 90 | 90 | $size = $this->defaultSize; |
| 91 | 91 | } elseif (is_string($size)) { |
| 92 | - $size = (int)Text::parseFileSize($size, $this->defaultSize); |
|
| 92 | + $size = (int) Text::parseFileSize($size, $this->defaultSize); |
|
| 93 | 93 | } |
| 94 | 94 | if (!is_int($size)) { |
| 95 | 95 | throw new \InvalidArgumentException( |
@@ -302,10 +302,10 @@ discard block |
||
| 302 | 302 | { |
| 303 | 303 | $input = '@Alice @Bob @Bobby Junior @Bobby Tables @Dr. No'; |
| 304 | 304 | $expected = |
| 305 | - "<a href='/at/Alice'>@Alice</a>" . |
|
| 306 | - " @Bob " . |
|
| 307 | - "<a href='/at/Bobby+Junior'>@Bobby Junior</a>" . |
|
| 308 | - " @Bobby Tables " . |
|
| 305 | + "<a href='/at/Alice'>@Alice</a>". |
|
| 306 | + " @Bob ". |
|
| 307 | + "<a href='/at/Bobby+Junior'>@Bobby Junior</a>". |
|
| 308 | + " @Bobby Tables ". |
|
| 309 | 309 | "<a href='/at/Dr.+No'>@Dr. No</a>"; |
| 310 | 310 | |
| 311 | 311 | $result = $this->_Parser->parse($input); |
@@ -634,8 +634,8 @@ discard block |
||
| 634 | 634 | public function testIframe() |
| 635 | 635 | { |
| 636 | 636 | //* test allowed domain |
| 637 | - $input = '[iframe height=349 width=560 ' . |
|
| 638 | - 'src=http://www.youtube.com/embed/HdoW3t_WorU ' . |
|
| 637 | + $input = '[iframe height=349 width=560 '. |
|
| 638 | + 'src=http://www.youtube.com/embed/HdoW3t_WorU '. |
|
| 639 | 639 | 'frameborder=0][/iframe]'; |
| 640 | 640 | $expected = [ |
| 641 | 641 | [ |
@@ -659,8 +659,8 @@ discard block |
||
| 659 | 659 | $this->assertHtml($expected, $result); |
| 660 | 660 | |
| 661 | 661 | //* test forbidden domains |
| 662 | - $input = '[iframe height=349 width=560 ' . |
|
| 663 | - 'src=http://www.youtubescam.com/embed/HdoW3t_WorU ' . |
|
| 662 | + $input = '[iframe height=349 width=560 '. |
|
| 663 | + 'src=http://www.youtubescam.com/embed/HdoW3t_WorU '. |
|
| 664 | 664 | 'frameborder=0][/iframe]'; |
| 665 | 665 | $pattern = '/src/i'; |
| 666 | 666 | $result = $this->_Parser->parse( |
@@ -672,8 +672,8 @@ discard block |
||
| 672 | 672 | |
| 673 | 673 | public function testIframeAllDomainsAllowed() |
| 674 | 674 | { |
| 675 | - $input = '[iframe height=349 width=560 ' . |
|
| 676 | - 'src=http://www.youtubescam.com/embed/HdoW3t_WorU ' . |
|
| 675 | + $input = '[iframe height=349 width=560 '. |
|
| 676 | + 'src=http://www.youtubescam.com/embed/HdoW3t_WorU '. |
|
| 677 | 677 | '][/iframe]'; |
| 678 | 678 | $expected = 'src="http://www.youtubescam.com/embed/HdoW3t_WorU'; |
| 679 | 679 | $this->MarkupSettings->setSingle('video_domains_allowed', '*'); |
@@ -683,8 +683,8 @@ discard block |
||
| 683 | 683 | |
| 684 | 684 | public function testIframeNoDomainAllowed() |
| 685 | 685 | { |
| 686 | - $input = '[iframe height=349 width=560 ' . |
|
| 687 | - 'src=http://www.youtubescam.com/embed/HdoW3t_WorU ' . |
|
| 686 | + $input = '[iframe height=349 width=560 '. |
|
| 687 | + 'src=http://www.youtubescam.com/embed/HdoW3t_WorU '. |
|
| 688 | 688 | '][/iframe]'; |
| 689 | 689 | $expected = '/src/i'; |
| 690 | 690 | $result = $this->_Parser->parse( |
@@ -1029,7 +1029,7 @@ discard block |
||
| 1029 | 1029 | { |
| 1030 | 1030 | // [code]<citation mark>[/code] should not be cited |
| 1031 | 1031 | $input = h( |
| 1032 | - "[code]\n" . $this->_Helper->getConfig('quote_symbol') . "\n[/code]" |
|
| 1032 | + "[code]\n".$this->_Helper->getConfig('quote_symbol')."\n[/code]" |
|
| 1033 | 1033 | ); |
| 1034 | 1034 | $expected = '`span class=.*?richtext-citation`'; |
| 1035 | 1035 | $result = $this->_Parser->parse($input); |
@@ -1046,11 +1046,11 @@ discard block |
||
| 1046 | 1046 | public function testQuote() |
| 1047 | 1047 | { |
| 1048 | 1048 | $_qs = $this->MarkupSettings->get('quote_symbol'); |
| 1049 | - $input = $_qs . ' fo [b]test[/b] ba'; |
|
| 1049 | + $input = $_qs.' fo [b]test[/b] ba'; |
|
| 1050 | 1050 | $result = $this->_Parser->parse($input); |
| 1051 | 1051 | $expected = [ |
| 1052 | 1052 | 'span' => ['class' => 'richtext-citation'], |
| 1053 | - $_qs . ' fo ', |
|
| 1053 | + $_qs.' fo ', |
|
| 1054 | 1054 | 'strong' => [], |
| 1055 | 1055 | 'test', |
| 1056 | 1056 | '/strong', |