Profiler/Db.php
Avoid using static access to class '\ADM\QuickDevBar\Helper\Debug' in method 'queryStart'. Open
Open
$this->queryBacktrace[$keyQuery] = Debug::trace([], 5);
- Read upRead up
- Exclude checks
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
The property $_filePath is not named in camelCase. Open
Open
class Db extends \Zend_Db_Profiler
{
protected static $_filePath;
protected $queryBacktrace = [];
- Read upRead up
- Exclude checks
CamelCasePropertyName
Since: 0.2
It is considered best practice to use the camelCase notation to name attributes.
Example
class ClassName {
protected $property_name;
}
Source
Avoid classes with short names like Db. Configured minimum length is 3. Open
Open
class Db extends \Zend_Db_Profiler
{
protected static $_filePath;
protected $queryBacktrace = [];
- Read upRead up
- Exclude checks
ShortClassName
Since: 2.9
Detects when classes or interfaces have a very short name.
Example
class Fo {
}
interface Fo {
}