Dhii/expression-abstract

View on GitHub
src/Expression/AbstractExpression.php

Summary

Maintainability
A
0 mins
Test Coverage

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

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

    protected function _removeTerm($index)
    {
        array_splice($this->terms, $index, 1, 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 _getTerms is not named in camelCase.
Open

    protected function _getTerms()
    {
        return $this->terms;
    }
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

There are no issues that match your filters.

Category
Status