open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/GeneratePerimeter/GeneratePerimeterManager.php

Summary

Maintainability
A
0 mins
Test Coverage

Doc-block of $strategy in addStrategy contains phpdoc param type \OpenOrchestra\Backoffice\GeneratePerimeter\PerimeterStrategyInterface which is incompatible with the param type \OpenOrchestra\Backoffice\GeneratePerimeter\Strategy\GeneratePerimeterStrategyInterface declared in the signature
Open

     * @param PerimeterStrategyInterface $strategy

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

        $perimetersConfiguration = array();

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 must be one blank line after the last USE statement; 0 found;
Open

use OpenOrchestra\Backoffice\GeneratePerimeter\Strategy\GeneratePerimeterStrategyInterface;

The static declaration must come after the visibility declaration
Open

    static public function changePathToName($path) {

The static declaration must come after the visibility declaration
Open

    static public function changeNameToPath($name) {

Line exceeds 120 characters; contains 121 characters
Open

            $perimeters = array_merge($perimeters, array($strategy->getType() => $strategy->generatePerimeter($siteId)));

Opening brace should be on a new line
Open

    static public function changeNameToPath($name) {

Opening brace should be on a new line
Open

    static public function changePathToName($path) {

There are no issues that match your filters.

Category
Status