jaroslavtyc/drd-plus-codes

View on GitHub
tests/Codes/Partials/TranslatableCodeTest.php

Summary

Maintainability
A
0 mins
Test Coverage

Missing class import via use statement (line '33', column '18').
Open

        if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {

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

Missing class import via use statement (line '19', column '18').
Open

        if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {

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

Missing class import via use statement (line '47', column '18').
Open

        if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {

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

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

            throw new \DrdPlus\Codes\Partials\Exceptions\UnknownValueForCode(

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 '$translatableCode'.
Open

        TranslatableCode $translatableCode): string

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

    public function I_can_not_create_code_from_unknown_value()
    {
        $this->expectException(\DrdPlus\Codes\Partials\Exceptions\UnknownValueForCode::class);
        $this->expectExceptionMessageMatches('~da Vinci~');
        if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {

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

    public function I_can_use_code_object_as_its_string_value()
    {
        if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {
            self::assertFalse(false, 'Can not create enum from abstract class');

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

    public function I_can_get_translation_for_few_with_decimal()
    {
        if ((new \ReflectionClass(self::getSutClass()))->isAbstract()) {
            self::assertFalse(false, 'Can not create enum from abstract class');

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