seregazhuk/php-pinterest-bot

View on GitHub
src/Api/Providers/Boards.php

Summary

Maintainability
A
0 mins
Test Coverage

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

        $nameWithRemovedSpaces = str_replace(' ', '-', $board);
Severity: Minor
Found in src/Api/Providers/Boards.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

Avoid using short method names like Boards::my(). The configured minimum method name length is 3.
Open

    public function my()
    {
        return $this->forMe();
    }
Severity: Minor
Found in src/Api/Providers/Boards.php by phpmd

ShortMethodName

Since: 0.2

Detects when very short method names are used.

Example

class ShortMethod {
    public function a( $index ) { // Violation
    }
}

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

Only one argument is allowed per line in a multi-line function call
Open

            UrlBuilder::RESOURCE_GET_BOARD_FEED, ['board_id' => $boardId], $limit
Severity: Minor
Found in src/Api/Providers/Boards.php by phpcodesniffer

Only one argument is allowed per line in a multi-line function call
Open

            ], $attributes
Severity: Minor
Found in src/Api/Providers/Boards.php by phpcodesniffer

Only one argument is allowed per line in a multi-line function call
Open

            UrlBuilder::RESOURCE_GET_BOARD_FEED, ['board_id' => $boardId], $limit
Severity: Minor
Found in src/Api/Providers/Boards.php by phpcodesniffer

Line exceeds 120 characters; contains 125 characters
Open

        return function_exists('mb_strtolower') ? mb_strtolower($nameWithRemovedSpaces) : strtolower($nameWithRemovedSpaces);
Severity: Minor
Found in src/Api/Providers/Boards.php by phpcodesniffer

There are no issues that match your filters.

Category
Status