chrismou/phergie-irc-plugin-react-google

View on GitHub

Showing 9 of 9 total issues

Function exports has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(grunt) {

    grunt.initConfig({
        phpunit: {
            unit: {
Severity: Minor
Found in Gruntfile.js - About 1 hr to fix

    Avoid unused parameters such as '$apiResponse'.
    Open

        public function getNoResultsLines(Event $event, $apiResponse)
    Severity: Minor
    Found in src/Provider/GoogleSearch.php by phpmd

    Since: PHPMD 0.2

    Avoid passing parameters to methods or constructors and then not using those parameters.

    Example:

    class Foo
      {
          private function bar($howdy)
          {
              // $howdy is not used
          }
      }

    Source: http://phpmd.org/rules/unusedcode.txt

    Avoid unused parameters such as '$apiError'.
    Open

        public function getRejectLines(Event $event, $apiError)
    Severity: Minor
    Found in src/Provider/GoogleSearch.php by phpmd

    Since: PHPMD 0.2

    Avoid passing parameters to methods or constructors and then not using those parameters.

    Example:

    class Foo
      {
          private function bar($howdy)
          {
              // $howdy is not used
          }
      }

    Source: http://phpmd.org/rules/unusedcode.txt

    Avoid unused local variables such as '$provider'.
    Open

            foreach ($this->providers as $command => $provider) {
    Severity: Minor
    Found in src/Plugin.php by phpmd

    Since: PHPMD 0.2

    Detects when a local variable is declared and/or assigned, but not used.

    Example:

    class Foo {
          public function doSomething()
          {
              $i = 5; // Unused
          }
      }

    Source: http://phpmd.org/rules/unusedcode.txt

    Avoid unused parameters such as '$event'.
    Open

        public function getNoResultsLines(Event $event, $apiResponse)
    Severity: Minor
    Found in src/Provider/GoogleSearch.php by phpmd

    Since: PHPMD 0.2

    Avoid passing parameters to methods or constructors and then not using those parameters.

    Example:

    class Foo
      {
          private function bar($howdy)
          {
              // $howdy is not used
          }
      }

    Source: http://phpmd.org/rules/unusedcode.txt

    Avoid unused parameters such as '$event'.
    Open

        public function getRejectLines(Event $event, $apiError)
    Severity: Minor
    Found in src/Provider/GoogleSearch.php by phpmd

    Since: PHPMD 0.2

    Avoid passing parameters to methods or constructors and then not using those parameters.

    Example:

    class Foo
      {
          private function bar($howdy)
          {
              // $howdy is not used
          }
      }

    Source: http://phpmd.org/rules/unusedcode.txt

    The method handleCommand uses an else expression. Else is never necessary and you can simplify the code to work without else.
    Open

            } else {
                $this->handleCommandhelp($event, $queue);
            }
    Severity: Minor
    Found in src/Plugin.php by phpmd

    Since: PHPMD 1.4.0

    An if expression with an else branch is never necessary. You can rewrite the conditions in a way that the else is not necessary and the code becomes simpler to read. To achieve this use early return statements. To achieve this you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example:

    class Foo
      {
          public function bar($flag)
          {
              if ($flag) {
                  // one branch
              } else {
                  // another branch
              }
          }
      }

    Source: http://phpmd.org/rules/cleancode.txt

    Avoid unused parameters such as '$event'.
    Open

        public function getSuccessLines(Event $event, $apiResponse)
    Severity: Minor
    Found in src/Provider/GoogleSearchCount.php by phpmd

    Since: PHPMD 0.2

    Avoid passing parameters to methods or constructors and then not using those parameters.

    Example:

    class Foo
      {
          private function bar($howdy)
          {
              // $howdy is not used
          }
      }

    Source: http://phpmd.org/rules/unusedcode.txt

    The method getSuccessLines uses an else expression. Else is never necessary and you can simplify the code to work without else.
    Open

            } else {
                $messages = $this->getNoResultsLines($event, $apiResponse);
            }
    Severity: Minor
    Found in src/Provider/GoogleSearch.php by phpmd

    Since: PHPMD 1.4.0

    An if expression with an else branch is never necessary. You can rewrite the conditions in a way that the else is not necessary and the code becomes simpler to read. To achieve this use early return statements. To achieve this you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

    Example:

    class Foo
      {
          public function bar($flag)
          {
              if ($flag) {
                  // one branch
              } else {
                  // another branch
              }
          }
      }

    Source: http://phpmd.org/rules/cleancode.txt

    Severity
    Category
    Status
    Source
    Language