lib/Ajde/Exception/Log.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class 'Ajde_Exception_Handler' in method 'logException'.
Open

        $level = Ajde_Exception_Handler::getExceptionLevelMap($exception);
Severity: Minor
Found in lib/Ajde/Exception/Log.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 using static access to class 'Ajde_Exception_Handler' in method 'logException'.
Open

        $channel = Ajde_Exception_Handler::getExceptionChannelMap($exception);
Severity: Minor
Found in lib/Ajde/Exception/Log.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 using static access to class 'Ajde_Exception_Handler' in method 'logException'.
Open

        $type = Ajde_Exception_Handler::getTypeDescription($exception);
Severity: Minor
Found in lib/Ajde/Exception/Log.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 using static access to class 'Ajde_Exception_Handler' in method 'logException'.
Open

        $trace = strip_tags(Ajde_Exception_Handler::trace($exception, Ajde_Exception_Handler::EXCEPTION_TRACE_ONLY));
Severity: Minor
Found in lib/Ajde/Exception/Log.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 using static access to class 'Ajde_Log' in method 'logException'.
Open

        Ajde_Log::_($exception->getMessage(), $channel, $level, $type,
            sprintf('%s on line %s', $exception->getFile(), $exception->getLine()), $trace);
Severity: Minor
Found in lib/Ajde/Exception/Log.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

The class Ajde_Exception_Log is not named in CamelCase.
Open

class Ajde_Exception_Log extends Ajde_Object_Static
{
    /**
     * @param Throwable $exception
     */
Severity: Minor
Found in lib/Ajde/Exception/Log.php by phpmd

CamelCaseClassName

Since: 0.2

It is considered best practice to use the CamelCase notation to name classes.

Example

class class_name {
}

Source

There are no issues that match your filters.

Category
Status