rugk/xenforo-threema-gateway

View on GitHub

Showing 597 of 597 total issues

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

    public function getMessageDataByType($messageType, $includeMetaData = true)

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

Missing class import via use statement (line '406', column '45').
Open

            throw new XenForo_Exception(new XenForo_Phrase('threemagw_missing_database_data'));

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '152', column '45').
Open

            throw new XenForo_Exception(new XenForo_Phrase('threemagw_libsodium_error'));

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Avoid too many return statements within this method.
Open

            return false;
Severity: Major
Found in src/library/ThreemaGateway/Tfa/Fast.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return true;
    Severity: Major
    Found in src/library/ThreemaGateway/Tfa/Reversed.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

              return true;
      Severity: Major
      Found in src/library/ThreemaGateway/Tfa/Reversed.php - About 30 mins to fix

        Missing class import via use statement (line '434', column '23').
        Open

                    throw new XenForo_Exception(new XenForo_Phrase('threemagw_unknown_message_type'));

        MissingImport

        Since: 2.7.0

        Importing all external classes in a file through use statements makes them clearly visible.

        Example

        function make() {
            return new \stdClass();
        }

        Source http://phpmd.org/rules/cleancode.html#MissingImport

        Avoid too many return statements within this method.
        Open

                    return false; // and fail silently
        Severity: Major
        Found in src/library/ThreemaGateway/Tfa/Fast.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return true;
          Severity: Major
          Found in src/library/ThreemaGateway/Tfa/Fast.php - About 30 mins to fix

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

                public function injectFetchOption($option, $value, $append = false)

            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

            Missing class import via use statement (line '34', column '45').
            Open

                        throw new XenForo_Exception(new XenForo_Phrase('threemagw_threema_id_does_not_exist') . ' ' . $e->getMessage());

            MissingImport

            Since: 2.7.0

            Importing all external classes in a file through use statements makes them clearly visible.

            Example

            function make() {
                return new \stdClass();
            }

            Source http://phpmd.org/rules/cleancode.html#MissingImport

            Avoid too many return statements within this method.
            Open

                    return true;
            Severity: Major
            Found in src/library/ThreemaGateway/Tfa/Conventional.php - About 30 mins to fix

              Missing class import via use statement (line '380', column '27').
              Open

                              throw new XenForo_Exception(new XenForo_Phrase('threemagw_unknown_message_type'));

              MissingImport

              Since: 2.7.0

              Importing all external classes in a file through use statements makes them clearly visible.

              Example

              function make() {
                  return new \stdClass();
              }

              Source http://phpmd.org/rules/cleancode.html#MissingImport

              Avoid too many return statements within this method.
              Open

                      return true;
              Severity: Major
              Found in src/library/ThreemaGateway/Tfa/Fast.php - About 30 mins to fix

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

                    public static function roundToDayRelative($minutes, $roundUp = false)

                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 true;
                Severity: Major
                Found in src/library/ThreemaGateway/Handler/Settings.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return false;
                  Severity: Major
                  Found in src/library/ThreemaGateway/Tfa/Conventional.php - About 30 mins to fix

                    Missing class import via use statement (line '380', column '49').
                    Open

                                    throw new XenForo_Exception(new XenForo_Phrase('threemagw_unknown_message_type'));

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

                    Source http://phpmd.org/rules/cleancode.html#MissingImport

                    Missing class import via use statement (line '31', column '26').
                    Open

                                $hashes[(new XenForo_Phrase('threemagw_integrity_of_addon_could_not_checked'))->render()] = '0';

                    MissingImport

                    Since: 2.7.0

                    Importing all external classes in a file through use statements makes them clearly visible.

                    Example

                    function make() {
                        return new \stdClass();
                    }

                    Source http://phpmd.org/rules/cleancode.html#MissingImport

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

                        public function getMessageMetaData($groupById = false, $ignoreInvalid = true)

                    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