Dhii/expression-abstract

View on GitHub
src/Expression/AbstractBufferedExpression.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$ctx'.
Open

    protected function _getOrderedTerms(ValueAwareInterface $ctx = null)

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

The variable $_next is not named in camelCase.
Open

    protected function _eval(ValueAwareInterface $ctx = null)
    {
        $terms    = $this->_getOrderedTerms($ctx);
        $numTerms = count($terms);

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $_next is not named in camelCase.
Open

    protected function _eval(ValueAwareInterface $ctx = null)
    {
        $terms    = $this->_getOrderedTerms($ctx);
        $numTerms = count($terms);

CamelCaseVariableName

Since: 0.2

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

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The method _defaultValue is not named in camelCase.
Open

    abstract protected function _defaultValue(ValueAwareInterface $ctx = null);

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _updateBuffer is not named in camelCase.
Open

    abstract protected function _updateBuffer($buffer, $next, ValueAwareInterface $ctx = null);

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _evaluate is not named in camelCase.
Open

    protected function _evaluate(ValueAwareInterface $ctx = null)
    {
        return $this->_eval($ctx);
    }

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _evaluateTerm is not named in camelCase.
Open

    protected function _evaluateTerm(EvaluableInterface $term, ValueAwareInterface $ctx = null)
    {
        return $term->evaluate($ctx);
    }

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _getOrderedTerms is not named in camelCase.
Open

    protected function _getOrderedTerms(ValueAwareInterface $ctx = null)
    {
        return $this->_getTerms();
    }

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method _eval is not named in camelCase.
Open

    protected function _eval(ValueAwareInterface $ctx = null)
    {
        $terms    = $this->_getOrderedTerms($ctx);
        $numTerms = count($terms);

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status