bizley/yii2-podium

View on GitHub

Showing 419 of 419 total issues

Avoid too many return statements within this method.
Open

        return [
            false,
            Yii::t('podium/flash', 'The password reset link has been sent to your e-mail address.'),
            true
        ];
Severity: Major
Found in src/models/forms/ResetForm.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                    return $this->module->goPodium();
    Severity: Major
    Found in src/controllers/AccountController.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return $this->render('deletepoll', ['model' => $poll]);
      Severity: Major
      Found in src/controllers/ForumController.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                            return Json::encode($data);
        Severity: Major
        Found in src/controllers/ForumController.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return false;
          Severity: Major
          Found in src/filters/PodiumRoleRule.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return $this->controller->redirect(['admin/members']);
            Severity: Major
            Found in src/actions/AdminAction.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return $this->redirect(['members/view', 'id' => $model->id, 'slug' => $model->podiumSlug]);
              Severity: Major
              Found in src/controllers/MembersController.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return $this->render('post', [
                            'replyFor' => $replyFor,
                            'preview' => $preview,
                            'model' => $model,
                            'thread' => $thread,
                Severity: Major
                Found in src/controllers/ForumPostController.php - About 30 mins to fix

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

                      public static function deletedUserTag($simple = false)
                  Severity: Minor
                  Found in src/helpers/Helper.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 podiumUserTag has a boolean flag argument $simple, which is a certain sign of a Single Responsibility Principle violation.
                  Open

                      public static function podiumUserTag($name, $role, $id = null, $slug = null, $simple = false)
                  Severity: Minor
                  Found in src/helpers/Helper.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 danger has a boolean flag argument $removeAfterAccess, which is a certain sign of a Single Responsibility Principle violation.
                  Open

                      public function danger($message, $removeAfterAccess = true)
                  Severity: Minor
                  Found in src/traits/FlashTrait.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->render('deletepost', ['model' => $post]);
                  Severity: Major
                  Found in src/controllers/ForumPostController.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            return Json::encode($data);
                    Severity: Major
                    Found in src/controllers/ForumPostController.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              return $this->render('report', ['model' => $model, 'post' => $post]);
                      Severity: Major
                      Found in src/controllers/ForumPostController.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                return true;
                        Severity: Major
                        Found in src/controllers/BaseController.php - About 30 mins to fix

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

                              public function search($params, $active = false, $mods = false)
                          Severity: Minor
                          Found in src/models/UserSearch.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 prepareQuery has a boolean flag argument $topics, which is a certain sign of a Single Responsibility Principle violation.
                          Open

                              protected function prepareQuery($query, $topics = false)
                          Severity: Minor
                          Found in src/models/forms/SearchForm.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 Json::encode($data);
                          Severity: Major
                          Found in src/controllers/ForumPostController.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                    return $this->render('moveposts', [
                                        'model' => $thread,
                                        'list' => $list,
                                        'options' => $options,
                                        'listforum' => $listforum,
                            Severity: Major
                            Found in src/controllers/ForumPostController.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                          return Html::tag('span',
                                              Html::tag('span', '', ['class' => 'glyphicon glyphicon-ok-circle'])
                                              . ' ' . Yii::t('podium/view', "New categories' order has been saved."),
                                              ['class' => 'text-success']
                                          );
                              Severity: Major
                              Found in src/controllers/AdminForumController.php - About 30 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language