Completed
Push — master ( d1f682...d4e8e7 )
by Nate
07:17 queued 05:30
created
src/helpers/Query.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      * Standard param parsing.
28 28
      *
29 29
      * @param $value
30
-     * @param $join
30
+     * @param string $join
31 31
      * @return bool
32 32
      */
33 33
     public static function parseBaseParam(&$value, &$join)
Please login to merge, or discard this patch.
src/controllers/OrganizationController.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
 namespace flipbox\organization\controllers;
10 10
 
11 11
 use Craft;
12
-use flipbox\organization\elements\Organization as OrganizationElement;
13 12
 use flipbox\organization\Organization as OrganizationPlugin;
13
+use flipbox\organization\elements\Organization as OrganizationElement;
14 14
 use yii\web\ForbiddenHttpException;
15 15
 
16 16
 /**
Please login to merge, or discard this patch.
src/controllers/view/OrganizationController.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     const TEMPLATE_UPSERT = self::TEMPLATE_BASE . DIRECTORY_SEPARATOR . 'upsert';
47 47
 
48 48
     /**
49
-     * @return string
49
+     * @return Response
50 50
      */
51 51
     public function actionIndex()
52 52
     {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      * @param null $identifier
75 75
      * @param null $typeIdentifier
76 76
      * @param OrganizationElement|null $organization
77
-     * @return string
77
+     * @return Response
78 78
      */
79 79
     public function actionUpsert($identifier = null, $typeIdentifier = null, OrganizationElement $organization = null)
80 80
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
 use Craft;
12 12
 use craft\base\Field;
13 13
 use craft\helpers\UrlHelper;
14
+use flipbox\organization\Organization as OrganizationPlugin;
14 15
 use flipbox\organization\elements\Organization as OrganizationElement;
15 16
 use flipbox\organization\elements\User as UserElement;
16 17
 use flipbox\organization\events\RegisterOrganizationActions;
17 18
 use flipbox\organization\models\Type;
18
-use flipbox\organization\Organization as OrganizationPlugin;
19 19
 use flipbox\organization\web\assets\element\Element;
20 20
 use flipbox\spark\helpers\SiteHelper;
21 21
 use yii\web\Response;
Please login to merge, or discard this patch.
src/elements/db/Organization.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -270,7 +270,7 @@
 block discarded – undo
270 270
     /**
271 271
      * Sets the [[userId]] property.
272 272
      *
273
-     * @param string|string[]|integer|integer[]|UserElement|UserElement[] $users The property value
273
+     * @param \craft\base\ElementInterface $users The property value
274 274
      *
275 275
      * @return self The query object itself
276 276
      */
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@
 block discarded – undo
10 10
 
11 11
 use Craft;
12 12
 use craft\db\Query;
13
-use craft\elements\db\ElementQuery;
14 13
 use craft\elements\User as UserElement;
14
+use craft\elements\db\ElementQuery;
15 15
 use craft\helpers\ArrayHelper;
16 16
 use craft\helpers\Db;
17 17
 use craft\models\UserGroup;
18 18
 use craft\records\UserGroup as UserGroupRecord;
19 19
 use craft\records\UserGroup_User as UserGroupUsersRecord;
20
+use flipbox\organization\Organization as OrganizationPlugin;
20 21
 use flipbox\organization\elements\Organization as OrganizationElement;
21 22
 use flipbox\organization\helpers\Query as QueryHelper;
22 23
 use flipbox\organization\models\Type;
23
-use flipbox\organization\Organization as OrganizationPlugin;
24 24
 use flipbox\organization\records\Organization as OrganizationRecord;
25 25
 use flipbox\organization\records\OrganizationType as OrganizationTypeOrganizationRecord;
26 26
 use flipbox\organization\records\User as OrganizationUserRecord;
Please login to merge, or discard this patch.
src/elements/Organization.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
     /**
502 502
      * Get an associated type by identifier (id/handle)
503 503
      *
504
-     * @param $identifier
504
+     * @param integer $identifier
505 505
      * @return null|TypeModel
506 506
      */
507 507
     public function getType($identifier)
@@ -1367,7 +1367,7 @@  discard block
 block discarded – undo
1367 1367
     }
1368 1368
 
1369 1369
     /**
1370
-     * @param string|User $user
1370
+     * @param User $user
1371 1371
      * @return bool
1372 1372
      */
1373 1373
     public function isOwner($user = 'CURRENT_USER')
Please login to merge, or discard this patch.
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,24 +9,24 @@
 block discarded – undo
9 9
 namespace flipbox\organization\elements;
10 10
 
11 11
 use Craft;
12
+use DateTime;
12 13
 use craft\base\Element;
13 14
 use craft\db\Query;
15
+use craft\elements\User;
14 16
 use craft\elements\actions\Edit as EditAction;
15 17
 use craft\elements\db\ElementQueryInterface;
16 18
 use craft\elements\db\UserQuery;
17
-use craft\elements\User;
18 19
 use craft\helpers\ArrayHelper;
19 20
 use craft\helpers\StringHelper;
20 21
 use craft\helpers\UrlHelper as UrlHelper;
21 22
 use craft\validators\DateTimeValidator;
22
-use DateTime;
23
+use flipbox\organization\Organization as OrganizationPlugin;
23 24
 use flipbox\organization\elements\actions\ChangeOrganizationStatus as StatusAction;
24 25
 use flipbox\organization\elements\actions\DeleteOrganization as DeleteAction;
25 26
 use flipbox\organization\elements\db\Organization as OrganizationQuery;
26 27
 use flipbox\organization\helpers\Type as TypeHelper;
27 28
 use flipbox\organization\helpers\User as UserHelper;
28 29
 use flipbox\organization\models\Type as TypeModel;
29
-use flipbox\organization\Organization as OrganizationPlugin;
30 30
 use flipbox\organization\records\Organization as OrganizationRecord;
31 31
 use flipbox\organization\records\User as OrganizationUsersRecord;
32 32
 use flipbox\organization\validators\Owner;
Please login to merge, or discard this patch.
src/fields/User.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -693,7 +693,7 @@
 block discarded – undo
693 693
     /**
694 694
      * Returns any additional criteria parameters limiting which elements the field should be able to select.
695 695
      *
696
-     * @return array
696
+     * @return null|ElementInterface
697 697
      */
698 698
     protected function inputSelectionCriteria(): array
699 699
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -221,12 +221,12 @@  discard block
 block discarded – undo
221 221
                 'max' => $this->allowLimit && $this->limit ? $this->limit : null,
222 222
                 'tooFew' => Craft::t(
223 223
                     'app',
224
-                    '{attribute} should contain at least {min, number} '.
224
+                    '{attribute} should contain at least {min, number} ' .
225 225
                     '{min, plural, one{selection} other{selections}}.'
226 226
                 ),
227 227
                 'tooMany' => Craft::t(
228 228
                     'app',
229
-                    '{attribute} should contain at most {max, number} '.
229
+                    '{attribute} should contain at most {max, number} ' .
230 230
                     '{max, plural, one{selection} other{selections}}.'
231 231
                 ),
232 232
             ],
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
         $titles = [];
341 341
 
342 342
         foreach ($value->all() as $relatedElement) {
343
-            $titles[] = (string)$relatedElement;
343
+            $titles[] = (string) $relatedElement;
344 344
         }
345 345
 
346 346
         return parent::getSearchKeywords($titles, $element);
@@ -669,8 +669,7 @@  discard block
 block discarded – undo
669 669
             'limit' => $this->allowLimit ? $this->limit : null,
670 670
             'viewMode' => $this->viewMode(),
671 671
             'selectionLabel' => $this->selectionLabel ?
672
-                Craft::t('site', $this->selectionLabel) :
673
-                static::defaultSelectionLabel()
672
+                Craft::t('site', $this->selectionLabel) : static::defaultSelectionLabel()
674 673
         ];
675 674
     }
676 675
 
Please login to merge, or discard this patch.
Unused Use Statements   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,18 +15,18 @@
 block discarded – undo
15 15
 use craft\base\Field;
16 16
 use craft\base\PreviewableFieldInterface;
17 17
 use craft\db\Query;
18
+use craft\elements\User as UserElement;
18 19
 use craft\elements\db\ElementQuery;
19 20
 use craft\elements\db\ElementQueryInterface;
20
-use craft\elements\User as UserElement;
21 21
 use craft\helpers\ElementHelper;
22 22
 use craft\helpers\StringHelper;
23 23
 use craft\validators\ArrayValidator;
24
-use flipbox\organization\elements\db\Organization as OrganizationQuery;
24
+use flipbox\organization\Organization as OrganizationPlugin;
25 25
 use flipbox\organization\elements\Organization as OrganizationElement;
26
+use flipbox\organization\elements\db\Organization as OrganizationQuery;
26 27
 use flipbox\organization\helpers\Query as QueryHelper;
27
-use flipbox\organization\Organization as OrganizationPlugin;
28
-use flipbox\organization\records\User as OrganizationUserRecord;
29 28
 use flipbox\organization\queue\jobs\LocalizeRelations;
29
+use flipbox\organization\records\User as OrganizationUserRecord;
30 30
 use flipbox\organization\validators\User as UserValidator;
31 31
 use yii\base\Exception;
32 32
 
Please login to merge, or discard this patch.
src/models/TypeSettings.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 use craft\models\FieldLayout;
14 14
 use craft\validators\SiteIdValidator;
15 15
 use craft\validators\UriFormatValidator;
16
-use flipbox\organization\elements\Organization as OrganizationElement;
17 16
 use flipbox\organization\Organization as OrganizationPlugin;
17
+use flipbox\organization\elements\Organization as OrganizationElement;
18 18
 use flipbox\spark\models\ModelWithId;
19 19
 use yii\base\InvalidConfigException;
20 20
 
Please login to merge, or discard this patch.
src/modules/configuration/services/Type.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     /**
58 58
      * @param TypeModel $type
59 59
      * @param bool $isNew
60
-     * @return bool
60
+     * @return boolean|null
61 61
      */
62 62
     public function afterSave(TypeModel $type, bool $isNew)
63 63
     {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
 use Craft;
12 12
 use craft\helpers\App;
13 13
 use craft\helpers\ArrayHelper;
14
-use flipbox\organization\elements\db\Organization;
15 14
 use flipbox\organization\elements\Organization as OrganizationElement;
15
+use flipbox\organization\elements\db\Organization;
16 16
 use flipbox\organization\models\Type as TypeModel;
17 17
 use flipbox\organization\models\TypeSettings as TypeSettingsModel;
18 18
 use flipbox\organization\records\TypeSettings as TypeSettingsRecord;
Please login to merge, or discard this patch.
src/services/AbstractType.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      * @param OrganizationElement $organization
57 57
      * @param array $criteria
58 58
      * @param string $scenario
59
-     * @return TypeModel|null
59
+     * @return \flipbox\spark\models\Model|null
60 60
      */
61 61
     public function findPrimaryByOrganization(
62 62
         OrganizationElement $organization,
Please login to merge, or discard this patch.