brokencube/automatorm

View on GitHub
src/Orm/Dump.php

Summary

Maintainability
D
2 days
Test Coverage

Function format has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
Open

    public static function format($key, $value, $seen = [], $collectionCount = 0, $exceptionThrown = false)
    {
        switch (true) {
            case $value instanceof Model:
                $namespace = explode('\\', get_class($value));
Severity: Minor
Found in src/Orm/Dump.php - About 5 hrs 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

Method format has 113 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static function format($key, $value, $seen = [], $collectionCount = 0, $exceptionThrown = false)
    {
        switch (true) {
            case $value instanceof Model:
                $namespace = explode('\\', get_class($value));
Severity: Major
Found in src/Orm/Dump.php - About 4 hrs to fix

    Function dumpModel has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function dumpModel(Model $model)
        {
            $data_access = function ($var) {
                return $this->$var;
            };
    Severity: Minor
    Found in src/Orm/Dump.php - About 3 hrs 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

    Method dumpModel has 84 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function dumpModel(Model $model)
        {
            $data_access = function ($var) {
                return $this->$var;
            };
    Severity: Major
    Found in src/Orm/Dump.php - About 3 hrs to fix

      Method format has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public static function format($key, $value, $seen = [], $collectionCount = 0, $exceptionThrown = false)
      Severity: Minor
      Found in src/Orm/Dump.php - About 35 mins to fix

        The method dumpModel() has 104 lines of code. Current threshold is set to 100. Avoid really long methods.
        Open

            public static function dumpModel(Model $model)
            {
                $data_access = function ($var) {
                    return $this->$var;
                };
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        The method format() has 134 lines of code. Current threshold is set to 100. Avoid really long methods.
        Open

            public static function format($key, $value, $seen = [], $collectionCount = 0, $exceptionThrown = false)
            {
                switch (true) {
                    case $value instanceof Model:
                        $namespace = explode('\\', get_class($value));
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        The method format() has an NPath complexity of 208. The configured NPath complexity threshold is 200.
        Open

            public static function format($key, $value, $seen = [], $collectionCount = 0, $exceptionThrown = false)
            {
                switch (true) {
                    case $value instanceof Model:
                        $namespace = explode('\\', get_class($value));
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        NPathComplexity

        Since: 0.1

        The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

        Example

        class Foo {
            function bar() {
                // lots of complicated code
            }
        }

        Source https://phpmd.org/rules/codesize.html#npathcomplexity

        The method dumpModel() has an NPath complexity of 1728. The configured NPath complexity threshold is 200.
        Open

            public static function dumpModel(Model $model)
            {
                $data_access = function ($var) {
                    return $this->$var;
                };
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        NPathComplexity

        Since: 0.1

        The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

        Example

        class Foo {
            function bar() {
                // lots of complicated code
            }
        }

        Source https://phpmd.org/rules/codesize.html#npathcomplexity

        The method format() has a Cyclomatic Complexity of 23. The configured cyclomatic complexity threshold is 10.
        Open

            public static function format($key, $value, $seen = [], $collectionCount = 0, $exceptionThrown = false)
            {
                switch (true) {
                    case $value instanceof Model:
                        $namespace = explode('\\', get_class($value));
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        CyclomaticComplexity

        Since: 0.1

        Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

        Example

        // Cyclomatic Complexity = 11
        class Foo {
        1   public function example() {
        2       if ($a == $b) {
        3           if ($a1 == $b1) {
                        fiddle();
        4           } elseif ($a2 == $b2) {
                        fiddle();
                    } else {
                        fiddle();
                    }
        5       } elseif ($c == $d) {
        6           while ($c == $d) {
                        fiddle();
                    }
        7        } elseif ($e == $f) {
        8           for ($n = 0; $n < $h; $n++) {
                        fiddle();
                    }
                } else {
                    switch ($z) {
        9               case 1:
                            fiddle();
                            break;
        10              case 2:
                            fiddle();
                            break;
        11              case 3:
                            fiddle();
                            break;
                        default:
                            fiddle();
                            break;
                    }
                }
            }
        }

        Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

        The method dumpModel() has a Cyclomatic Complexity of 15. The configured cyclomatic complexity threshold is 10.
        Open

            public static function dumpModel(Model $model)
            {
                $data_access = function ($var) {
                    return $this->$var;
                };
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        CyclomaticComplexity

        Since: 0.1

        Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

        Example

        // Cyclomatic Complexity = 11
        class Foo {
        1   public function example() {
        2       if ($a == $b) {
        3           if ($a1 == $b1) {
                        fiddle();
        4           } elseif ($a2 == $b2) {
                        fiddle();
                    } else {
                        fiddle();
                    }
        5       } elseif ($c == $d) {
        6           while ($c == $d) {
                        fiddle();
                    }
        7        } elseif ($e == $f) {
        8           for ($n = 0; $n < $h; $n++) {
                        fiddle();
                    }
                } else {
                    switch ($z) {
        9               case 1:
                            fiddle();
                            break;
        10              case 2:
                            fiddle();
                            break;
        11              case 3:
                            fiddle();
                            break;
                        default:
                            fiddle();
                            break;
                    }
                }
            }
        }

        Source https://phpmd.org/rules/codesize.html#cyclomaticcomplexity

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                            $value = $this->_data->$key;
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                    $output .= "  <span><strong>connection</strong></span> => ".$this->connection->name."\n";
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                    foreach (get_class_methods($this) as $method) {
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                                $value = $this->{$key};
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                    $output .= "  <span><strong>table</strong></span> => ".$this->table."\n";
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$objstrings' which will lead to PHP notices.
        Open

                                        $objstrings[] = \Automatorm\Orm\Dump::safeTruncate($obj);
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                    $output .= "  <span><strong>id</strong></span> => ".$this->id."\n";
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                    return $this->$var;
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                            $value = $this->_data->join($key, ['id' => array_slice($ids, 0, \Automatorm\Orm\Dump::$id_limit)]);
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                    $data = $data_access->bindTo($this->_data, $this->_data);
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                                        [$contents['column_name'] => $this->id],
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$objstrings' which will lead to PHP notices.
        Open

                                    $display4 = implode(',', $objstrings);
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                    $data = $data_access->bindTo($this->_data, $this->_data);
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                            $ids = $this->{$key}->id->toArray();
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                    foreach (get_object_vars($this) as $key => $value) {
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                                $value = $this->$method();
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                            $value = $this->_data->$key;
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Avoid using undefined variables such as '$this' which will lead to PHP notices.
        Open

                            $count = $this->_data->joinCount($key, []);
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        UndefinedVariable

        Since: 2.8.0

        Detects when a variable is used that has not been defined before.

        Example

        class Foo
        {
            private function bar()
            {
                // $message is undefined
                echo $message;
            }
        }

        Source https://phpmd.org/rules/cleancode.html#undefinedvariable

        Variable $this is undeclared
        Open

                    return $this->$var;
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                    $data = $data_access->bindTo($this->_data, $this->_data);
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                    foreach (get_object_vars($this) as $key => $value) {
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (str) is \Automatorm\Orm\Model|\JsonSerializable but \substr() takes string
        Open

                    return htmlspecialchars(substr($string, 0, $length)) . '...';
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (str) is \ArrayAccess|\Automatorm\Orm\Collection|\Automatorm\Orm\Model|\Countable|\Iterator|\JsonSerializable|\Traversable|iterable but \substr() takes string
        Open

                    return htmlspecialchars(substr($string, 0, $length)) . '...';
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (string) is ?\Automatorm\Orm\Model|\Automatorm\Orm\Model|\JsonSerializable but \htmlspecialchars() takes string
        Open

                return htmlspecialchars($string);
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                    $output .= "  <span><strong>table</strong></span> => ".$this->table."\n";
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Suspicious type \Automatorm\Orm\Collection of a variable or expression used to build a string. (Expected type to be able to cast to a string)
        Open

                        $display3 = '"' . $value .'"';
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Suspicious type null of a variable or expression used to build a string. (Expected type to be able to cast to a string)
        Open

                        $display3 = '"' . $value .'"';
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                            $value = $this->_data->$key;
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Checking instanceof against undeclared class \Automatorm\Orm\DateTimeInterface (Did you mean interface \DateTimeInterface)
        Open

                    case $value instanceof DateTimeInterface:
        Severity: Critical
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                    $output .= "  <span><strong>connection</strong></span> => ".$this->connection->name."\n";
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (string) is \Automatorm\Orm\Model|\JsonSerializable but \htmlspecialchars() takes string
        Open

                return htmlspecialchars($string);
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (string) is ?\Automatorm\Orm\Model|\Automatorm\Orm\Model|\JsonSerializable but \strlen() takes string
        Open

                if (strlen($string) > $length) {
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (string) is \ArrayAccess|\Automatorm\Orm\Collection|\Automatorm\Orm\Model|\Countable|\Iterator|\JsonSerializable|\Traversable|iterable but \strlen() takes string
        Open

                if (strlen($string) > $length) {
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                            $value = $this->_data->$key;
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (str) is ?\Automatorm\Orm\Model|\Automatorm\Orm\Model|\JsonSerializable but \substr() takes string
        Open

                    return htmlspecialchars(substr($string, 0, $length)) . '...';
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Expected an object instance or a class name when accessing a static property, but saw an expression with type null
        Open

                        $table = $value::$tablename;
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                                        [$contents['column_name'] => $this->id],
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                                $value = $this->{$key};
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (object) is null but \get_class() takes object
        Open

                        $namespace = explode('\\', get_class($value));
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                            $count = $this->_data->joinCount($key, []);
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                            $value = $this->_data->join($key, ['id' => array_slice($ids, 0, \Automatorm\Orm\Dump::$id_limit)]);
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (string) is \Automatorm\Orm\Model|\JsonSerializable but \strlen() takes string
        Open

                if (strlen($string) > $length) {
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Static property 'tablename' on \Automatorm\Orm\Collection is undeclared
        Open

                        $table = $value::$tablename;
        Severity: Critical
        Found in src/Orm/Dump.php by phan

        Argument 1 (object) is null but \method_exists() takes object|string
        Open

                        if (method_exists($value, '__toString')) {
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                            $ids = $this->{$key}->id->toArray();
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        null passed to foreach instead of array
        Open

                        foreach ($value as $obj) {
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        null passed to foreach instead of array
        Open

                                    foreach ($value as $obj) {
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                    $output .= "  <span><strong>id</strong></span> => ".$this->id."\n";
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $objstrings was undeclared, but array fields are being added to it.
        Open

                                        $objstrings[] = \Automatorm\Orm\Dump::safeTruncate($obj);
        Severity: Info
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                                $value = $this->$method();
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (object) is null but \get_class() takes object
        Open

                        $namespace = explode('\\', get_class($value));
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Call to method format on non-class type null
        Open

                        $display3 = $value->format('Y-m-d H:i:s');
        Severity: Critical
        Found in src/Orm/Dump.php by phan

        Argument 1 (string) is \ArrayAccess|\Automatorm\Orm\Collection|\Automatorm\Orm\Model|\Countable|\Iterator|\JsonSerializable|\Traversable|iterable but \htmlspecialchars() takes string
        Open

                return htmlspecialchars($string);
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Variable $this is undeclared
        Open

                    foreach (get_class_methods($this) as $method) {
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        Argument 1 (object) is null but \get_class() takes object
        Open

                        if (get_class($value) == 'Automatorm\\Orm\\Model') {
        Severity: Minor
        Found in src/Orm/Dump.php by phan

        The property $id_limit is not named in camelCase.
        Open

        class Dump
        {
            public static $url_prefix = null;
            public static $id_limit = 30;
            
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        CamelCasePropertyName

        Since: 0.2

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

        Example

        class ClassName {
            protected $property_name;
        }

        Source

        The property $url_prefix is not named in camelCase.
        Open

        class Dump
        {
            public static $url_prefix = null;
            public static $id_limit = 30;
            
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        CamelCasePropertyName

        Since: 0.2

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

        Example

        class ClassName {
            protected $property_name;
        }

        Source

        The variable $data_access is not named in camelCase.
        Open

            public static function dumpModel(Model $model)
            {
                $data_access = function ($var) {
                    return $this->$var;
                };
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        CamelCaseVariableName

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

        The variable $data_access is not named in camelCase.
        Open

            public static function dumpModel(Model $model)
            {
                $data_access = function ($var) {
                    return $this->$var;
                };
        Severity: Minor
        Found in src/Orm/Dump.php by phpmd

        CamelCaseVariableName

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

        There are no issues that match your filters.

        Category
        Status