Completed
Branch feature/phpstanLevel2 (435bc7)
by Schlaefer
02:41
created
plugins/ImageUploader/tests/TestCase/Lib/UploaderConfigTest.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.
plugins/ImageUploader/src/Lib/UploaderConfig.php 1 patch
Spacing   +3 added lines, -3 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
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(
Please login to merge, or discard this patch.
plugins/ImageUploader/tests/TestCase/Controller/ThumbnailControllerTest.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
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
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
Please login to merge, or discard this patch.
plugins/ImageUploader/src/Model/Table/UploadsTable.php 1 patch
Spacing   +3 added lines, -3 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
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
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);
Please login to merge, or discard this patch.
plugins/ImageUploader/src/Model/Entity/Upload.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.
plugins/ImageUploader/src/Controller/ThumbnailController.php 1 patch
Spacing   +4 added lines, -4 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,8 +35,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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."
Please login to merge, or discard this patch.
plugins/ImageUploader/src/Controller/UploadsController.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
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
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);
Please login to merge, or discard this patch.
plugins/ImageUploader/src/View/Helper/ImageUploaderHelper.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.
plugins/SaitoSearch/src/Lib/SimpleSearchString.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.