vpietri/magento2-developer-quickdevbar

View on GitHub
Profiler/Db.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\ADM\QuickDevBar\Helper\Debug' in method 'queryStart'.
Open

            $this->queryBacktrace[$keyQuery] = Debug::trace([], 5);
Severity: Minor
Found in Profiler/Db.php by phpmd

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

Avoid classes with short names like Db. Configured minimum length is 3.
Open

class Db extends \Zend_Db_Profiler
{
    protected static $_filePath;

    protected $queryBacktrace = [];
Severity: Minor
Found in Profiler/Db.php by phpmd

ShortClassName

Since: 2.9

Detects when classes or interfaces have a very short name.

Example

class Fo {

}

interface Fo {

}

Source https://phpmd.org/rules/naming.html#shortclassname

The property $_filePath is not named in camelCase.
Open

class Db extends \Zend_Db_Profiler
{
    protected static $_filePath;

    protected $queryBacktrace = [];
Severity: Minor
Found in Profiler/Db.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

There are no issues that match your filters.

Category
Status