mcred/FeedMeNow-PHP

View on GitHub

Showing 23 of 23 total issues

Avoid using static access to class '\Http\Discovery\HttpClientDiscovery' in method '__construct'.
Open

        $this->httpClient = $httpClient ?: HttpClientDiscovery::find();
Severity: Minor
Found in src/FeedMeNow/FeedMeNow.php by phpmd

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

    public function GetTitle()
    {
        return $this->title;
    }
Severity: Minor
Found in src/FeedMeNow/Model/Category.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 GetAlias is not named in camelCase.
Open

    public function GetAlias()
    {
        return $this->alias;
    }
Severity: Minor
Found in src/FeedMeNow/Model/Category.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