lancew/DojoList

View on GitHub
lib/limonade/assertions.php

Summary

Maintainability
A
2 hrs
Test Coverage

assert_trigger_error accesses the super-global variable $GLOBALS.
Open

function assert_trigger_error($callable, $args = array(), $message = '<1> should trigger an error') {
  test_run_assertion();
  $trigger_errors = count($GLOBALS["limonade"]["test_errors"]);
  set_error_handler("test_error_handler");
  $result = call_user_func_array($callable, $args);
Severity: Minor
Found in lib/limonade/assertions.php by phpmd

Since: PHPMD 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example:

class Foo {
      public function bar() {
          $name = $_POST['foo'];
      }
  }

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

Method assert_header has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
{
  test_run_assertion();
  # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
  $headers = preg_split("/^\s*$/ms", $response);
Severity: Minor
Found in lib/limonade/assertions.php - About 1 hr to fix

    Function assert_header has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php - About 55 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Avoid unused parameters such as '$value'.
    Open

    function assert_null($value, $message = '<1> should be NULL')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$expected'.
    Open

    function assert_identical($expected, $value, $message = '<1> should be identical to <2>')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$value'.
    Open

    function assert_not_identical($expected, $value, $message = '<1> should not be identical to <2>')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$class'.
    Open

    function assert_instance_of($class, $object, $message = '<2> is not an instance of class <1>') {
    Severity: Minor
    Found in lib/limonade/assertions.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 '$value'.
    Open

    function assert_true($value, $message = '<1> should be TRUE')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$value'.
    Open

    function assert_equal($expected, $value, $message = '<1> should be equal to <2>')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$has_header'.
    Open

      $has_header = preg_match($regex, $headers, $matches);    
    Severity: Minor
    Found in lib/limonade/assertions.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 '$expected'.
    Open

    function assert_equal($expected, $value, $message = '<1> should be equal to <2>')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$value'.
    Open

    function assert_identical($expected, $value, $message = '<1> should be identical to <2>')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$pattern'.
    Open

    function assert_match($pattern, $string, $message = '<2> expected to match regular expression <1>') {
    Severity: Minor
    Found in lib/limonade/assertions.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 '$object'.
    Open

    function assert_instance_of($class, $object, $message = '<2> is not an instance of class <1>') {
    Severity: Minor
    Found in lib/limonade/assertions.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 '$value'.
    Open

    function assert_not_null($value, $message = '<1> should not be NULL')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$pattern'.
    Open

    function assert_no_match($pattern, $string, $message = '<2> expected to not match regular expression <1>') {
    Severity: Minor
    Found in lib/limonade/assertions.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 '$value'.
    Open

    function assert_type($type, $value, $message = '<1> is not of type <2>') {
    Severity: Minor
    Found in lib/limonade/assertions.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 '$length'.
    Open

    function assert_length_of($value, $length, $message = '<1> expected to be of length <2>') {
    Severity: Minor
    Found in lib/limonade/assertions.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 '$value'.
    Open

    function assert_not_equal($expected, $value, $message = '<1> should not equal to <2>')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$value'.
    Open

    function assert_empty($value, $message = '<1> should be empty')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$string'.
    Open

    function assert_match($pattern, $string, $message = '<2> expected to match regular expression <1>') {
    Severity: Minor
    Found in lib/limonade/assertions.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 '$value'.
    Open

    function assert_not_empty($value, $message = '<1> should not be empty')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$expected'.
    Open

    function assert_not_identical($expected, $value, $message = '<1> should not be identical to <2>')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$string'.
    Open

    function assert_no_match($pattern, $string, $message = '<2> expected to not match regular expression <1>') {
    Severity: Minor
    Found in lib/limonade/assertions.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 '$predicate'.
    Open

      $predicate = 'is_' . strtolower(is_string($type) ? $type : gettype($type));
    Severity: Minor
    Found in lib/limonade/assertions.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 '$expected'.
    Open

    function assert_not_equal($expected, $value, $message = '<1> should not equal to <2>')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$trigger_errors'.
    Open

      $trigger_errors = count($GLOBALS["limonade"]["test_errors"]);
    Severity: Minor
    Found in lib/limonade/assertions.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 '$value'.
    Open

    function assert_false($value, $message = '<1> should be FALSE')
    Severity: Minor
    Found in lib/limonade/assertions.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 '$count'.
    Open

       $count = is_string($value) ? 'strlen' : 'count';
    Severity: Minor
    Found in lib/limonade/assertions.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 local variables such as '$result'.
    Open

      $result = call_user_func_array($callable, $args);
    Severity: Minor
    Found in lib/limonade/assertions.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

    TODO found
    Open

    # TODO add web browser assertions assert_http_get, assert_http_response... as in SimpleTest (http://www.simpletest.org/en/web_tester_documentation.html)
    Severity: Minor
    Found in lib/limonade/assertions.php by fixme

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

      } else {
          $regex = "/^{$regex_header}(:.*?)?$/ism";
      }
    Severity: Minor
    Found in lib/limonade/assertions.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

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

        {
          $message = "expected header '%s' to be equal to '%s' but header has not been sent";
        }
    Severity: Minor
    Found in lib/limonade/assertions.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

    The parameter $expected_name is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name parameters.

    Example:

    class ClassName {
          public function doSomething($user_name) {
          }
      }

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

    The parameter $expected_status is not named in camelCase.
    Open

    function assert_status($response, $expected_status, $message = "expected status code to be equal to '%s' but received '%s'")
    {
      $lines = explode('\n', trim($response));
      if (preg_match('/HTTP\/(\d+\.\d+)\s+(\d+)/i', $lines[0], $matches))
      {
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name parameters.

    Example:

    class ClassName {
          public function doSomething($user_name) {
          }
      }

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

    The parameter $expected_value is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name parameters.

    Example:

    class ClassName {
          public function doSomething($user_name) {
          }
      }

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

    The variable $regex_header is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $regex_header is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $regex_header is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $sent_header is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $has_header is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_value is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_name is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $trigger_errors is not named in camelCase.
    Open

    function assert_trigger_error($callable, $args = array(), $message = '<1> should trigger an error') {
      test_run_assertion();
      $trigger_errors = count($GLOBALS["limonade"]["test_errors"]);
      set_error_handler("test_error_handler");
      $result = call_user_func_array($callable, $args);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_name is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $regex_header is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $regex_header is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_value is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_value is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_status is not named in camelCase.
    Open

    function assert_status($response, $expected_status, $message = "expected status code to be equal to '%s' but received '%s'")
    {
      $lines = explode('\n', trim($response));
      if (preg_match('/HTTP\/(\d+\.\d+)\s+(\d+)/i', $lines[0], $matches))
      {
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_name is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_name is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $sent_header is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $sent_header is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_value is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_name is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_value is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    The variable $expected_value is not named in camelCase.
    Open

    function assert_header($response, $expected_name, $expected_value = null, $message = "expected header '%s' to be equal to '%s' but received '%s: %s'")
    {
      test_run_assertion();
      # see assert_header in http://github.com/fnando/voodoo-test/blob/f3b0994ef138a6ba94d5e7cef6c1fb1720797a86/lib/assertions.php
      $headers = preg_split("/^\s*$/ms", $response);
    Severity: Minor
    Found in lib/limonade/assertions.php by phpmd

    Since: PHPMD 0.2

    It is considered best practice to use the camelCase notation to name variables.

    Example:

    class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

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

    There are no issues that match your filters.

    Category
    Status