src/ast/expr/TypeExpr.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\QuackCompiler\Intl\Localization' in method 'getType'.
Open

            throw new TypeError(Localization::message('TYP200', [$this->name]));
Severity: Minor
Found in src/ast/expr/TypeExpr.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 '\QuackCompiler\Intl\Localization' in method 'getType'.
Open

            throw new TypeError(Localization::message('TYP210', [$this->name]));
Severity: Minor
Found in src/ast/expr/TypeExpr.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 '\QuackCompiler\Intl\Localization' in method 'getType'.
Open

            throw new TypeError(Localization::message('TYP120', [$this->name]));
Severity: Minor
Found in src/ast/expr/TypeExpr.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 unused local variables such as '$parameters'.
Open

        $parameters = $data->getParameters();
Severity: Minor
Found in src/ast/expr/TypeExpr.php by phpmd

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

TODO found
Open

        // TODO: Fill the parameters and auto-curry
Severity: Minor
Found in src/ast/expr/TypeExpr.php by fixme

There are no issues that match your filters.

Category
Status