Dhii/expression-abstract

View on GitHub

Showing 38 of 38 total issues

Missing class import via use statement (line '49', column '27').
Open

                throw new \InvalidArgumentException(
Severity: Minor
Found in src/Expression/AbstractExpression.php by phpmd

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

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 $_term is not named in camelCase.
Open

    protected function _setTerms(array $terms)
    {
        $this->_clearTerms();
        foreach ($terms as $_index => $_term) {
            if (!$_term instanceof EvaluableInterface) {
Severity: Minor
Found in src/Expression/AbstractExpression.php by phpmd

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 variable $_index is not named in camelCase.
Open

    protected function _setTerms(array $terms)
    {
        $this->_clearTerms();
        foreach ($terms as $_index => $_term) {
            if (!$_term instanceof EvaluableInterface) {
Severity: Minor
Found in src/Expression/AbstractExpression.php by phpmd

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 $_term is not named in camelCase.
Open

    protected function _setTerms(array $terms)
    {
        $this->_clearTerms();
        foreach ($terms as $_index => $_term) {
            if (!$_term instanceof EvaluableInterface) {
Severity: Minor
Found in src/Expression/AbstractExpression.php by phpmd

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 variable $_term is not named in camelCase.
Open

    protected function _setTerms(array $terms)
    {
        $this->_clearTerms();
        foreach ($terms as $_index => $_term) {
            if (!$_term instanceof EvaluableInterface) {
Severity: Minor
Found in src/Expression/AbstractExpression.php by phpmd

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 $_index is not named in camelCase.
Open

    protected function _setTerms(array $terms)
    {
        $this->_clearTerms();
        foreach ($terms as $_index => $_term) {
            if (!$_term instanceof EvaluableInterface) {
Severity: Minor
Found in src/Expression/AbstractExpression.php by phpmd

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 _clearTerms is not named in camelCase.
Open

    protected function _clearTerms()
    {
        $this->terms = array();

        return $this;
Severity: Minor
Found in src/Expression/AbstractExpression.php by phpmd

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 _setTerms is not named in camelCase.
Open

    protected function _setTerms(array $terms)
    {
        $this->_clearTerms();
        foreach ($terms as $_index => $_term) {
            if (!$_term instanceof EvaluableInterface) {
Severity: Minor
Found in src/Expression/AbstractExpression.php by phpmd

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 _getTerm is not named in camelCase.
Open

    protected function _getTerm($index)
    {
        return isset($this->terms[$index])
            ? $this->terms[$index]
            : null;
Severity: Minor
Found in src/Expression/AbstractExpression.php by phpmd

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 _setValues is not named in camelCase.
Open

    protected function _setValues(array $values)
    {
        $this->value = $values;

        return $this;

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 _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 _getOrderedTerms is not named in camelCase.
Open

    protected function _getOrderedTerms(ValueAwareInterface $ctx = null)
    {
        return array_reverse($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 _getValue is not named in camelCase.
Open

    protected function _getValue()
    {
        return $this->value;
    }
Severity: Minor
Found in src/Term/AbstractValueTerm.php by phpmd

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 _getValueOf is not named in camelCase.
Open

    protected function _getValueOf($key)
    {
        return $this->_hasValue($key)
            ? $this->value[$key]
            : 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 _addTerm is not named in camelCase.
Open

    protected function _addTerm(EvaluableInterface $term)
    {
        $this->terms[] = $term;

        return $this;
Severity: Minor
Found in src/Expression/AbstractExpression.php by phpmd

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 _setValue is not named in camelCase.
Open

    protected function _setValue($value)
    {
        $this->value = $value;

        return $this;
Severity: Minor
Found in src/Term/AbstractValueTerm.php by phpmd

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

Severity
Category
Status
Source
Language