Sibyx/phpGPX

View on GitHub
tests/UnitTests/phpGPX/Parsers/PersonParserTest.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\phpGPX\Parsers\PersonParser' in method 'testParse'.
Open

        $person = PersonParser::parse($this->testXmlFile->author);

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

Avoid using static access to class '\phpGPX\Parsers\PersonParser' in method 'convertToXML'.
Open

        return PersonParser::toXML($this->testModelInstance, $document);

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

Avoid using static access to class 'UnitTests\phpGPX\Parsers\EmailParserTest' in method 'createTestInstance'.
Open

        $person->email = EmailParserTest::createTestInstance();

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

Avoid using static access to class 'UnitTests\phpGPX\Parsers\LinkParserTest' in method 'createTestInstance'.
Open

        $person->links[] = LinkParserTest::createTestInstance();

StaticAccess

Since: 1.4.0

Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.

Example

class Foo
{
    public function bar()
    {
        Bar::baz();
    }
}

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

The variable $gpx_file is not named in camelCase.
Open

    public function testEmptyLinks()
    {
        $gpx_file = new GpxFile();

        $gpx_file->metadata = new Metadata();

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

    public function testEmptyLinks()
    {
        $gpx_file = new GpxFile();

        $gpx_file->metadata = new Metadata();

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

    public function testEmptyLinks()
    {
        $gpx_file = new GpxFile();

        $gpx_file->metadata = new Metadata();

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

    public function testEmptyLinks()
    {
        $gpx_file = new GpxFile();

        $gpx_file->metadata = new Metadata();

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

    public function testEmptyLinks()
    {
        $gpx_file = new GpxFile();

        $gpx_file->metadata = new Metadata();

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

There are no issues that match your filters.

Category
Status