midasplatform/Midas

View on GitHub
core/ComponentLoader.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class 'MidasLoader' in method 'loadComponents'.
Open

                MidasLoader::loadComponent($component, $module);
Severity: Minor
Found in core/ComponentLoader.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 'MidasLoader' in method 'loadComponents'.
Open

            MidasLoader::loadComponent($components, $module);
Severity: Minor
Found in core/ComponentLoader.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 'MidasLoader' in method 'loadComponent'.
Open

        return MidasLoader::loadComponent($component, $module);
Severity: Minor
Found in core/ComponentLoader.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_ComponentLoader
Severity: Minor
Found in core/ComponentLoader.php by phpcodesniffer

The class MIDAS_ComponentLoader is not named in CamelCase.
Open

class MIDAS_ComponentLoader
{
    /**
     * Load multiple components into the Zend registry.
     *
Severity: Minor
Found in core/ComponentLoader.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_ComponentLoader" is not in camel caps format
Open

class MIDAS_ComponentLoader
Severity: Minor
Found in core/ComponentLoader.php by phpcodesniffer

There are no issues that match your filters.

Category
Status