Infanatica/InfanaticaCepModule

View on GitHub
src/InfanaticaCepModule/Response/EnderecoResponse.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using undefined variables such as '$retorno' which will lead to PHP notices.
Open

        $retorno['bairro']      = $this->getBairro();

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$retorno' which will lead to PHP notices.
Open

        return $retorno;

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$retorno' which will lead to PHP notices.
Open

        $retorno['uf']          = $this->getUf();

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$retorno' which will lead to PHP notices.
Open

        $retorno['localidade']  = $this->getLocalidade();

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Avoid using undefined variables such as '$retorno' which will lead to PHP notices.
Open

        $retorno['logradouro']  = $this->getLogradouro();

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

Source https://phpmd.org/rules/cleancode.html#undefinedvariable

Missing class import via use statement (line '52', column '20').
Open

        $xml = new \SimpleXMLElement('<endereco/>');

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 variables with short names like $uf. Configured minimum length is 3.
Open

    protected $uf;

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

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

    public function setUf($uf)

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

Opening brace of a class must be on the line after the definition
Open

class EnderecoResponse implements EnderecoResponseInterface{

End of line character is invalid; expected "\n" but found "\r\n"
Open

<?php

Expected 1 space after closing parenthesis; found 10
Open

        foreach ($enderecoArray as $key => $value)

Expected 1 newline at end of file; 0 found
Open

}

There are no issues that match your filters.

Category
Status