rhosocial/yii2-organization

View on GitHub

Showing 816 of 816 total issues

Space found before comma in function call
Open

            $this->removeMemberSuccessMessage = Yii::t('organization' ,'Member Removed.');

Space found before comma in function call
Open

            $this->updateSuccessMessage = Yii::t('user' ,'Updated.');

Space found before comma in function call
Open

            $this->organizationSetUpSuccessMessage = Yii::t('organization' ,'Organization Set Up.');

The method removeAdministrator has a boolean flag argument $keep, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function removeAdministrator(&$member, $keep = true)
Severity: Minor
Found in Organization.php by phpmd

BooleanArgumentFlag

Since: 1.4.0

A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

Example

class Foo {
    public function bar($flag = true) {
    }
}

Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

Avoid too many return statements within this method.
Open

                return Url::to(['update', 'id' => $model->getID()]);
Severity: Major
Found in grid/OrganizationListActionColumn.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return Yii::$app->authManager->checkAccess($this->operator->getGUID(), $permission, ['organization' => $model]);
    Severity: Major
    Found in grid/OrganizationListActionColumn.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                          return false;
      Severity: Major
      Found in grid/OrganizationListActionColumn.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return $result;
        Severity: Major
        Found in Organization.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                          return Url::to(['exit', 'id' => $model->getID()]);
          Severity: Major
          Found in grid/OrganizationListActionColumn.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return true;
            Severity: Major
            Found in grid/OrganizationListActionColumn.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                              return Yii::$app->authManager->checkAccess($this->operator->getGUID(), (new ManageMember)->name, ['organization' => $model->organization]);
              Severity: Major
              Found in grid/MemberListActionColumn.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return Url::to(['revoke', 'id' => $model->getID()]);
                Severity: Major
                Found in grid/OrganizationListActionColumn.php - About 30 mins to fix

                  The method setSetting has a boolean flag argument $unique, which is a certain sign of a Single Responsibility Principle violation.
                  Open

                      public function setSetting($item, $value, $unique = false)
                  Severity: Minor
                  Found in Organization.php by phpmd

                  BooleanArgumentFlag

                  Since: 1.4.0

                  A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                  Example

                  class Foo {
                      public function bar($flag = true) {
                      }
                  }

                  Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                  The method setIsOnlyAcceptCurrentOrgMember has a boolean flag argument $value, which is a certain sign of a Single Responsibility Principle violation.
                  Open

                      public function setIsOnlyAcceptCurrentOrgMember($value = true)
                  Severity: Minor
                  Found in Organization.php by phpmd

                  BooleanArgumentFlag

                  Since: 1.4.0

                  A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                  Example

                  class Foo {
                      public function bar($flag = true) {
                      }
                  }

                  Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                  Avoid too many return statements within this method.
                  Open

                              return '#';
                  Severity: Major
                  Found in grid/OrganizationListActionColumn.php - About 30 mins to fix

                    The method setIsDisallowMemberJoinOther has a boolean flag argument $value, which is a certain sign of a Single Responsibility Principle violation.
                    Open

                        public function setIsDisallowMemberJoinOther($value = true)
                    Severity: Minor
                    Found in Organization.php by phpmd

                    BooleanArgumentFlag

                    Since: 1.4.0

                    A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                    Example

                    class Foo {
                        public function bar($flag = true) {
                        }
                    }

                    Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                    Avoid too many return statements within this method.
                    Open

                                    return Url::to(['settings', 'id' => $model->getID()]);
                    Severity: Major
                    Found in grid/OrganizationListActionColumn.php - About 30 mins to fix

                      The method setIsOnlyAcceptSuperiorOrgMember has a boolean flag argument $value, which is a certain sign of a Single Responsibility Principle violation.
                      Open

                          public function setIsOnlyAcceptSuperiorOrgMember($value = true)
                      Severity: Minor
                      Found in Organization.php by phpmd

                      BooleanArgumentFlag

                      Since: 1.4.0

                      A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                      Example

                      class Foo {
                          public function bar($flag = true) {
                          }
                      }

                      Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                      Avoid too many return statements within this method.
                      Open

                              return $this->controller->redirect(['member', 'org' => $org]);
                      Severity: Major
                      Found in web/organization/controllers/my/AssignAdminAction.php - About 30 mins to fix

                        The method setIsExcludeOtherMembers has a boolean flag argument $value, which is a certain sign of a Single Responsibility Principle violation.
                        Open

                            public function setIsExcludeOtherMembers($value = true)
                        Severity: Minor
                        Found in Organization.php by phpmd

                        BooleanArgumentFlag

                        Since: 1.4.0

                        A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.

                        Example

                        class Foo {
                            public function bar($flag = true) {
                            }
                        }

                        Source https://phpmd.org/rules/cleancode.html#booleanargumentflag

                        Severity
                        Category
                        Status
                        Source
                        Language