bizley/yii2-podium

View on GitHub

Showing 419 of 419 total issues

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-warning-sign'])
                . ' ' . Yii::t('podium/view', "Sorry! We can not save new forums' 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 false;
        Severity: Major
        Found in src/controllers/BaseController.php - About 30 mins to fix

          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 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

            Avoid too many return statements within this method.
            Open

                        return $this->returnError($e->getMessage(), __METHOD__,
                            Yii::t('podium/flash', 'Error during table foreign key {name} adding', [
                                'name' => $this->getForeignName($key)
                            ])
                        );
            Severity: Major
            Found in src/maintenance/SchemaOperation.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

                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 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 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 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 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 alert has a boolean flag argument $removeAfterAccess, which is a certain sign of a Single Responsibility Principle violation.
                Open

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

                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

                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

                Severity
                Category
                Status
                Source
                Language