Completed
Branch feature/phpstanLevel2 (435bc7)
by Schlaefer
02:41
created
plugins/Installer/tests/TestCase/Controller/InstallControllerTest.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/Installer/src/Lib/IntegrationTestCase.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/Installer/src/Lib/InstallerState.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/Api/config/bootstrap.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/BbcodeParser/src/Lib/Helper/UrlParserTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,8 +118,8 @@
 block discarded – undo
118 118
         }
119 119
 
120 120
         $_placeholder = ' … ';
121
-        $leftMargin = (int)floor($_textWordMaxLength / 2);
122
-        $rightMargin = (int)(-1 * ($_textWordMaxLength - $leftMargin - mb_strlen($_placeholder)));
121
+        $leftMargin = (int) floor($_textWordMaxLength / 2);
122
+        $rightMargin = (int) (-1 * ($_textWordMaxLength - $leftMargin - mb_strlen($_placeholder)));
123 123
 
124 124
         $string = mb_substr($string, 0, $leftMargin) . $_placeholder .
125 125
             mb_substr($string, $rightMargin);
Please login to merge, or discard this patch.
plugins/Stopwatch/src/View/Helper/StopwatchHelper.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.
src/Shell/SaitoDummyDataShell.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
     public function generatePostings()
113 113
     {
114
-        $nPostings = (int)$this->in(
114
+        $nPostings = (int) $this->in(
115 115
             'Number of postings to generate?',
116 116
             null,
117 117
             100
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         if ($nPostings === 0) {
120 120
             return;
121 121
         }
122
-        $ratio = (int)$this->in('Average answers per thread?', null, 10);
122
+        $ratio = (int) $this->in('Average answers per thread?', null, 10);
123 123
         $seed = $nPostings / $ratio;
124 124
 
125 125
         $CurrentUser = new SaitoUserDummy();
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     public function generateUsers()
161 161
     {
162 162
         $max = count($this->_users);
163
-        $n = (int)$this->in(
163
+        $n = (int) $this->in(
164 164
             "Number of users to generate (max: $max)?",
165 165
             null,
166 166
             0
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
         }
197 197
         $this->out('.', 0);
198 198
         if ($i > 1 && !($i % 50)) {
199
-            $percent = (int)floor($i / $off * 100);
199
+            $percent = (int) floor($i / $off * 100);
200 200
             $this->out(sprintf(' %3s%%', $percent), 1);
201 201
         }
202 202
     }
Please login to merge, or discard this patch.
src/Model/Table/UsersTable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $this->addBehavior(
78 78
             'Proffer.Proffer',
79 79
             [
80
-                'avatar' => [ // The name of your upload field (filename)
80
+                'avatar' => [// The name of your upload field (filename)
81 81
                     'root' => $avatarRootDir,
82 82
                     'dir' => 'avatar_dir', // field for upload directory
83 83
                     'thumbnailSizes' => [
@@ -793,8 +793,8 @@  discard block
 block discarded – undo
793 793
             $User->set('user_category_custom', $newCats);
794 794
         } else {
795 795
             //=if set a single category
796
-            $category = (int)$category;
797
-            if ($category > 0 && $this->Entries->Categories->exists((int)$category)
796
+            $category = (int) $category;
797
+            if ($category > 0 && $this->Entries->Categories->exists((int) $category)
798 798
             ) {
799 799
                 $active = $category;
800 800
             } else {
Please login to merge, or discard this patch.
src/Model/Table/EntriesTable.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -618,7 +618,7 @@
 block discarded – undo
618 618
         $tree = reset($tree);
619 619
 
620 620
         //= extract subtree
621
-        if ((int)$tid !== (int)$id) {
621
+        if ((int) $tid !== (int) $id) {
622 622
             $tree = $tree->getThread()->get($id);
623 623
         }
624 624
 
Please login to merge, or discard this patch.
Doc Comments   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
      * get parent id
416 416
      *
417 417
      * @param int $id id
418
-     * @return mixed
418
+     * @return integer
419 419
      * @throws \UnexpectedValueException
420 420
      */
421 421
     public function getParentId($id)
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
     /**
627 627
      * trees for multiple tids
628 628
      *
629
-     * @param array $ids ids
629
+     * @param integer[] $ids ids
630 630
      * @param array $order order
631 631
      * @param array $fieldlist fieldlist
632 632
      * @return array|bool false if no threads or array of Postings
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
      * @param array $params params
679 679
      * - 'fields' array of thread-ids: [1, 2, 5]
680 680
      * - 'order' sort order for threads ['time' => 'ASC'],
681
-     * @return mixed unhydrated result set
681
+     * @return Query unhydrated result set
682 682
      */
683 683
     protected function _getThreadEntries(array $tid, array $params = [])
684 684
     {
@@ -746,6 +746,8 @@  discard block
 block discarded – undo
746 746
 
747 747
     /**
748 748
      * {@inheritDoc}
749
+     * @param integer $id
750
+     * @param string $key
749 751
      */
750 752
     public function toggle($id, $key)
751 753
     {
@@ -825,7 +827,7 @@  discard block
 block discarded – undo
825 827
      * Anonymizes the entries for a user
826 828
      *
827 829
      * @param string $userId user-ID
828
-     * @return bool success
830
+     * @return integer success
829 831
      */
830 832
     public function anonymizeEntriesFromUser($userId)
831 833
     {
@@ -932,7 +934,7 @@  discard block
 block discarded – undo
932 934
      * Check if posting is thread-root.
933 935
      *
934 936
      * @param array $id posting-ID or posting data
935
-     * @return mixed
937
+     * @return boolean
936 938
      */
937 939
     protected function _isRoot(array $id)
938 940
     {
@@ -1127,7 +1129,7 @@  discard block
 block discarded – undo
1127 1129
      *
1128 1130
      * @param null $tid thread-ID
1129 1131
      * @param null $newCategoryId id for new category
1130
-     * @return bool success
1132
+     * @return integer success
1131 1133
      * @throws NotFoundException
1132 1134
      * @throws \InvalidArgumentException
1133 1135
      */
Please login to merge, or discard this patch.