Completed
Branch feature/phpstanLevel2 (435bc7)
by Schlaefer
02:41
created
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/src/Controller/BookmarksController.php 2 patches
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
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function edit($id)
86 86
     {
87
-        $id = (int)$id;
87
+        $id = (int) $id;
88 88
         $bookmark = $this->getBookmark($id);
89 89
 
90 90
         $this->Bookmarks->patchEntity(
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function delete($id)
111 111
     {
112
-        $id = (int)$id;
112
+        $id = (int) $id;
113 113
         $bookmark = $this->getBookmark($id);
114 114
         if (!$this->Bookmarks->delete($bookmark)) {
115 115
             throw new GenericApiException('The bookmark could not be deleted.');
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,6 @@
 block discarded – undo
20 20
 use Cake\Http\Exception\MethodNotAllowedException;
21 21
 use Cake\Http\Exception\NotFoundException;
22 22
 use Cake\ORM\Entity;
23
-use Cake\ORM\Query;
24
-use Saito\App\Registry;
25 23
 use Saito\Exception\SaitoForbiddenException;
26 24
 
27 25
 /**
Please login to merge, or discard this patch.
src/Lib/Saito/Posting/Basic/BasicPostingTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      */
13 13
     public function isLocked()
14 14
     {
15
-        return (bool)$this->get('locked');
15
+        return (bool) $this->get('locked');
16 16
     }
17 17
 
18 18
     /**
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function isPinned()
32 32
     {
33
-        return (bool)$this->get('fixed');
33
+        return (bool) $this->get('fixed');
34 34
     }
35 35
 
36 36
     /**
Please login to merge, or discard this patch.
src/Lib/Saito/Contact/SaitoEmailContact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             $Users = TableRegistry::get('Users');
50 50
             $contact = $Users->find()
51 51
                 ->select(['id', 'username', 'user_email'])
52
-                ->where(['id' => (int)$contact])
52
+                ->where(['id' => (int) $contact])
53 53
                 ->first();
54 54
         }
55 55
 
Please login to merge, or discard this patch.
src/Model/Behavior/IpLoggingBehavior.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         $strlen = strlen($ip);
37 37
         if ($strlen > 6) {
38
-            $divider = (int)floor($strlen / 4) + 1;
38
+            $divider = (int) floor($strlen / 4) + 1;
39 39
             $ip = substr_replace($ip, '…', $divider, $strlen - (2 * $divider));
40 40
         }
41 41
 
Please login to merge, or discard this patch.
plugins/BbcodeParser/src/Lib/Preprocessor.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     /**
20 20
      * Constructor
21 21
      *
22
-     * @param array $settings settings
22
+     * @param \Saito\Markup\MarkupSettings $settings settings
23 23
      */
24 24
     public function __construct($settings)
25 25
     {
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.
src/View/Helper/ParserHelper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
     /**
87 87
      * get editor help
88 88
      *
89
-     * @return mixed
89
+     * @return string
90 90
      */
91 91
     public function editorHelp()
92 92
     {
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/ImageUploader/src/Plugin.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/tests/Fixture/UploadsFixture.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.