src/Layout/Admin.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\Atk4\Ui\Menu' in method 'init'.
Open

            $this->menuLeft = Menu::addTo($this, ['ui' => 'atk-sidenav-content'], ['LeftMenu']);
Severity: Minor
Found in src/Layout/Admin.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 '\Atk4\Ui\Icon' in method 'init'.
Open

            Icon::addTo($this->burger, ['content']);
Severity: Minor
Found in src/Layout/Admin.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 '\Atk4\Ui\Header' in method 'init'.
Open

            Header::addTo($this->menu, [$this->getApp()->title, 'size' => 4]);
Severity: Minor
Found in src/Layout/Admin.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 '\Atk4\Ui\Menu' in method 'init'.
Open

            $this->menu = Menu::addTo(
                $this,
                ['inverted fixed horizontal atk-admin-top-menu', 'element' => 'header'],
                ['TopMenu']
            );
Severity: Minor
Found in src/Layout/Admin.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

Line exceeds 120 characters; contains 129 characters
Open

 * On top of the content there is automated title showing page title but can also work as a bread-crumb or container for buttons.
Severity: Minor
Found in src/Layout/Admin.php by phpcodesniffer

There are no issues that match your filters.

Category
Status