mcred/FeedMeNow-PHP

View on GitHub
src/FeedMeNow/RequestBuilder.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid using static access to class '\Http\Discovery\MessageFactoryDiscovery' in method 'getRequestFactory'.
Open

            $this->requestFactory = MessageFactoryDiscovery::find();
Severity: Minor
Found in src/FeedMeNow/RequestBuilder.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

Avoid unused private fields such as '$multipartStreamBuilder'.
Open

    private $multipartStreamBuilder;
Severity: Minor
Found in src/FeedMeNow/RequestBuilder.php by phpmd

UnusedPrivateField

Since: 0.2

Detects when a private field is declared and/or assigned a value, but not used.

Example

class Something
{
    private static $FOO = 2; // Unused
    private $i = 5; // Unused
    private $j = 6;
    public function addOne()
    {
        return $this->j++;
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedprivatefield

Avoid excessively long variable names like $multipartStreamBuilder. Keep variable name length under 20.
Open

    private $multipartStreamBuilder;
Severity: Minor
Found in src/FeedMeNow/RequestBuilder.php by phpmd

LongVariable

Since: 0.2

Detects when a field, formal or local variable is declared with a long name.

Example

class Something {
    protected $reallyLongIntName = -3; // VIOLATION - Field
    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
        $otherReallyLongName = -5; // VIOLATION - Local
        for ($interestingIntIndex = 0; // VIOLATION - For
             $interestingIntIndex < 10;
             $interestingIntIndex++ ) {
        }
    }
}

Source https://phpmd.org/rules/naming.html#longvariable

There are no issues that match your filters.

Category
Status