Completed
Branch 5.0.0/release (babdec)
by Schlaefer
02:41
created
plugins/ImageUploader/src/Controller/UploadsController.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
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         }
58 58
         $data = [
59 59
             'document' => $submitted,
60
-            'name' => $this->CurrentUser->getId() . '_' . $submitted['name'],
60
+            'name' => $this->CurrentUser->getId().'_'.$submitted['name'],
61 61
             'size' => $submitted['size'],
62 62
             'type' => $submitted['type'],
63 63
             'user_id' => $this->CurrentUser->getId(),
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             throw new GenericApiException($msg);
95 95
         }
96 96
 
97
-        Cache::delete((string)$imageId, 'uploadsThumbnails');
97
+        Cache::delete((string) $imageId, 'uploadsThumbnails');
98 98
 
99 99
         $this->autoRender = false;
100 100
         $this->response = $this->response->withStatus(204);
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
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function thumb(): Response
36 36
     {
37
-        $id = (int)$this->request->getParam('id');
38
-        ['hash' => $fingerprint, 'type' => $type, 'raw' => $raw] = Cache::remember((string)$id, function () use ($id) {
37
+        $id = (int) $this->request->getParam('id');
38
+        ['hash' => $fingerprint, 'type' => $type, 'raw' => $raw] = Cache::remember((string) $id, function() use ($id) {
39 39
             $Uploads = $this->loadModel('ImageUploader.Uploads');
40 40
             $document = $Uploads->get($id);
41 41
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             return compact('hash', 'raw', 'type');
55 55
         }, 'uploadsThumbnails');
56 56
 
57
-        $hash = (string)$this->request->getQuery('h');
57
+        $hash = (string) $this->request->getQuery('h');
58 58
         if ($hash !== $fingerprint) {
59 59
             throw new SaitoForbiddenException(
60 60
                 "Attempt to access image-thumbnail $id."
Please login to merge, or discard this patch.
plugins/ImageUploader/src/Model/Entity/Upload.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,7 +35,7 @@  discard block
 block discarded – undo
35 35
         }
36 36
 
37 37
         $ext = array_pop($parts);
38
-        $text = Text::slug(implode('.', $parts), '_') . '.' . $ext;
38
+        $text = Text::slug(implode('.', $parts), '_').'.'.$ext;
39 39
 
40 40
         return $text;
41 41
     }
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function _getFile(): File
49 49
     {
50
-        $folderPath = rtrim(Configure::read('Saito.Settings.uploadDirectory'), DS) . DS;
51
-        return new File($folderPath . $this->get('name'));
50
+        $folderPath = rtrim(Configure::read('Saito.Settings.uploadDirectory'), DS).DS;
51
+        return new File($folderPath.$this->get('name'));
52 52
     }
53 53
 
54 54
     /**
Please login to merge, or discard this patch.
plugins/Feeds/config/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 Router::plugin(
7 7
     'Feeds',
8
-    function ($routes) {
8
+    function($routes) {
9 9
         $routes->setExtensions(['rss']);
10 10
         $routes->fallbacks(DashedRoute::class);
11 11
     }
Please login to merge, or discard this patch.
plugins/Bookmarks/tests/TestCase/Controller/BookmarksControllerTest.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
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         $this->get('api/v2/bookmarks');
61 61
 
62
-        $response = json_decode((string)$this->_response->getBody(), true);
62
+        $response = json_decode((string) $this->_response->getBody(), true);
63 63
 
64 64
         $this->assertNotEmpty($response['data'][0]['attributes']['threadline_html']);
65 65
         $response = Hash::remove($response, 'data.{n}.attributes.threadline_html');
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         $this->assertTrue($this->Bookmarks->exists(['entry_id' => 4, 'user_id' => 3]));
210 210
 
211 211
         $this->assertResponseCode(200);
212
-        $response = json_decode((string)$this->_response->getBody(), true);
212
+        $response = json_decode((string) $this->_response->getBody(), true);
213 213
         $expected = [
214 214
             'data' => [
215 215
                 'id' => 6,
Please login to merge, or discard this patch.
plugins/Bookmarks/tests/TestCase/Model/Table/BookmarksTableTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         'app.user',
29 29
         'app.user_online',
30 30
         'plugin.bookmarks.bookmark'
31
-       ];
31
+        ];
32 32
 
33 33
     /**
34 34
      * Test Bookmark table validation.
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/Bookmarks/config/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 Router::plugin(
6 6
     'Bookmarks',
7 7
     ['path' => '/api/v2'],
8
-    function ($routes) {
8
+    function($routes) {
9 9
         $routes->setExtensions(['json']);
10 10
         $routes->resources('Bookmarks');
11 11
     }
Please login to merge, or discard this patch.
plugins/Admin/tests/TestCase/Controller/CategoriesControllerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $this->_loginUser(1);
43 43
         $source = 2;
44 44
 
45
-        $readPostings = function () use ($source) {
45
+        $readPostings = function() use ($source) {
46 46
             $read = [];
47 47
             $read['all'] = $this->Entries->find()->all()->count();
48 48
             $read['source'] = $this->Entries->find()
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $source = 2;
79 79
         $target = 4;
80 80
 
81
-        $readPostings = function () use ($source, $target) {
81
+        $readPostings = function() use ($source, $target) {
82 82
             $read = [];
83 83
             $read['all'] = $this->Entries->find()->all()->count();
84 84
             $read['source'] = $this->Entries->find()
Please login to merge, or discard this patch.
plugins/Admin/config/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 Router::scope(
9 9
     '/admin',
10 10
     ['plugin' => 'Admin'],
11
-    function ($routes) {
11
+    function($routes) {
12 12
         $routes->connect(
13 13
             '/',
14 14
             ['controller' => 'Admins', 'action' => 'index']
Please login to merge, or discard this patch.