open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/GenerateForm/Strategies/SearchStrategy.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$options'.
Open

    public function buildForm(FormBuilderInterface $builder, array $options)

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

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

Call to method findAllSpecialPage from undeclared class \OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface
Open

        $specialPages = $this->nodeRepository->findAllSpecialPage($language, $siteId);

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('value', 'text', array(

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('limit', 'integer', array(

Parameter $nodeRepository has undeclared type \OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface
Open

    public function __construct(

Parameter $block has undeclared type \OpenOrchestra\ModelInterface\Model\BlockInterface
Open

    public function support(BlockInterface $block)

Call to method getComponent from undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open

        return $this->getName() === $block->getComponent();

Call to method add from undeclared class \Symfony\Component\Form\FormBuilderInterface
Open

        $builder->add('nodeId', 'choice', array(

Parameter $builder has undeclared type \Symfony\Component\Form\FormBuilderInterface
Open

    public function buildForm(FormBuilderInterface $builder, array $options)

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

        array $basicBlockConfiguration

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

The closing brace for the class must go on the next line after the body
Open

}

Opening brace should be on a new line
Open

    protected function getSpecialPageList() {

There are no issues that match your filters.

Category
Status