bizley/yii2-podium

View on GitHub

Showing 419 of 419 total issues

Avoid too many return statements within this method.
Open

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

    Avoid too many return statements within this method.
    Open

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

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

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

          public function success($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

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

          public static function can($permissionName, $params = [], $allowCaching = true)
      Severity: Minor
      Found in src/models/User.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 error has a boolean flag argument $removeAfterAccess, which is a certain sign of a Single Responsibility Principle violation.
      Open

          public function error($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

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

          public function ok($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

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

          public function warning($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

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

          public function markSeen($updateCounters = true)
      Severity: Minor
      Found in src/models/Post.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 info has a boolean flag argument $removeAfterAccess, which is a certain sign of a Single Responsibility Principle violation.
      Open

          public function info($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 Html::tag('span',
                  Html::tag('span', '', ['class' => 'glyphicon glyphicon-warning-sign'])
                  . ' ' . Yii::t('podium/view', "Sorry! We can not save new categories' order."),
                  ['class' => 'text-danger']
              );
      Severity: Major
      Found in src/controllers/AdminForumController.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return $this->redirect(['forum/maintenance']);
        Severity: Major
        Found in src/controllers/BaseController.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                                  return $this->redirect(['forum/show', 'id' => $model->id]);
          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 forums' order has been saved."),
                            ['class' => 'text-success']
                        );
            Severity: Major
            Found in src/controllers/AdminForumController.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                  return $this->redirect([
                                      'forum/thread',
                                      'cid' => $post->forum->category->id,
                                      'fid' => $post->forum->id,
                                      'id' => $post->thread->id,
              Severity: Major
              Found in src/controllers/ForumPostController.php - About 30 mins to fix

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

                    public function search($categoryId = null, $onlyVisible = false)
                Severity: Minor
                Found in src/models/Forum.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 verify has a boolean flag argument $guest, which is a certain sign of a Single Responsibility Principle violation.
                Open

                    public static function verify($categoryId = null, $id = null, $slug = null, $guest = true)
                Severity: Minor
                Found in src/models/Forum.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 getPodiumTag has a boolean flag argument $simple, which is a certain sign of a Single Responsibility Principle violation.
                Open

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

                    public function podiumThumb($up = true, $count = 0)
                Severity: Minor
                Found in src/models/Post.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