Showing 839 of 839 total issues

The property $is_generic is not named in camelCase.
Open

class NameTypeParselet implements PrefixParselet
{
    private $is_generic;

    public function __construct($is_generic = false)

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The property $scope_level is not named in camelCase.
Open

abstract class Parser
{
    use Parselet;

    public $input;
Severity: Minor
Found in src/parser/Parser.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    abstract public function injectScope($parent_scope);
Severity: Minor
Found in src/ast/Node.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $this->scope = new Scope($parent_scope);
        foreach ($this->parameters as $param) {
            if ($this->scope->hasLocal($param->name)) {
Severity: Minor
Found in src/ast/expr/LambdaExpr.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $this->scope = $parent_scope;
    }
Severity: Minor
Found in src/ast/expr/RegexExpr.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $this->scope = $parent_scope;
        $this->condition->injectScope($parent_scope);

Severity: Minor
Found in src/ast/stmt/IfStmt.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The property $is_generic is not named in camelCase.
Open

class NameType extends TypeNode
{
    use NameTypeChecker;
    use NameTypeRenderer;

Severity: Minor
Found in src/ast/types/NameType.php by phpmd

CamelCasePropertyName

Since: 0.2

It is considered best practice to use the camelCase notation to name attributes.

Example

class ClassName {
    protected $property_name;
}

Source

Avoid variables with short names like $n. Configured minimum length is 3.
Open

    public function forwardCursor($n)
Severity: Minor
Found in src/cli/Console.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $this->left->injectScope($parent_scope);
        $this->index->injectScope($parent_scope);
    }
Severity: Minor
Found in src/ast/expr/AccessExpr.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $this->scope = new Scope($parent_scope);
        // Bind where-symbols
        foreach ($this->clauses as $clause) {
Severity: Minor
Found in src/ast/expr/WhereExpr.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $stmt_list is not named in camelCase.
Open

    public function __construct($stmt_list)
    {
        $this->stmt_list = $stmt_list;
    }
Severity: Minor
Found in src/ast/stmt/ProgramStmt.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $this->scope = $parent_scope;
        $symbol = $parent_scope->lookup($this->name);

Severity: Minor
Found in src/ast/expr/NameExpr.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $defined = [];
        $operators = [];
        $index = 0;
Severity: Minor
Found in src/ast/expr/ObjectExpr.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $this->right->injectScope($parent_scope);
    }
Severity: Minor
Found in src/ast/expr/PartialFuncExpr.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $this->scope = $parent_scope;
        $this->from->injectScope($parent_scope);
        $this->to->injectScope($parent_scope);
Severity: Minor
Found in src/ast/expr/RangeExpr.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $this->scope = new Scope($parent_scope);
        return $this->body->injectScope($this->scope);
    }
Severity: Minor
Found in src/ast/stmt/BlockStmt.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $parent_scope->insert($this->signature->name, Symbol::S_VARIABLE);
        $this->scope = new Scope($parent_scope);

Severity: Minor
Found in src/ast/stmt/FnStmt.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $has_brackets is not named in camelCase.
Open

    public function __construct($parameters, $kind, $body, $has_brackets)
    {
        $this->parameters = $parameters;
        $this->kind = $kind;
        $this->body = $body;
Severity: Minor
Found in src/ast/expr/LambdaExpr.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $parent_scope is not named in camelCase.
Open

    public function injectScope($parent_scope)
    {
        $this->scope = new Scope($parent_scope);
        // Pre-inject label symbol
        $this->scope->insert($this->name, Symbol::S_LABEL);
Severity: Minor
Found in src/ast/stmt/LabelStmt.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

Avoid variables with short names like $me. Configured minimum length is 3.
Open

            $me = $this->types[$i];
Severity: Minor
Found in src/typechecker/TupleTypeChecker.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Severity
Category
Status
Source
Language