midasplatform/Midas

View on GitHub
core/GlobalComponent.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class 'Zend_Registry' in method 'getLogger'.
Open

        return Zend_Registry::get('logger');
Severity: Minor
Found in core/GlobalComponent.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

Each class must be in a namespace of at least one level (a top-level vendor name)
Open

class MIDAS_GlobalComponent extends Zend_Controller_Action_Helper_Abstract
Severity: Minor
Found in core/GlobalComponent.php by phpcodesniffer

The class MIDAS_GlobalComponent is not named in CamelCase.
Open

class MIDAS_GlobalComponent extends Zend_Controller_Action_Helper_Abstract
{
    /**
     * Fetch the logger from the Zend registry.
     *
Severity: Minor
Found in core/GlobalComponent.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

Class name "MIDAS_GlobalComponent" is not in camel caps format
Open

class MIDAS_GlobalComponent extends Zend_Controller_Action_Helper_Abstract
Severity: Minor
Found in core/GlobalComponent.php by phpcodesniffer

There are no issues that match your filters.

Category
Status