open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/Form/Type/Component/ContentTypeChoiceType.php

Summary

Maintainability
A
0 mins
Test Coverage

Parameter $contentTypeRepository has undeclared type \OpenOrchestra\ModelInterface\Repository\ContentTypeRepositoryInterface
Open

    public function __construct(

Return type of getParent() is undeclared type \Symfony\Component\Form\FormTypeInterface
Open

    public function getParent()

Call to method findAllNotDeletedInLastVersion from undeclared class \OpenOrchestra\ModelInterface\Repository\ContentTypeRepositoryInterface
Open

        $contentTypes = $this->contentTypeRepository->findAllNotDeletedInLastVersion();

Parameter $element has undeclared type \OpenOrchestra\ModelInterface\Model\ContentTypeInterface
Open

        $choices = array_map(function (ContentTypeInterface $element) use ($currentLanguage) {

Call to method getName from undeclared class \OpenOrchestra\ModelInterface\Model\ContentTypeInterface
Open

            return $element->getName($currentLanguage);

Parameter $resolver has undeclared type \Symfony\Component\OptionsResolver\OptionsResolver
Open

    public function configureOptions(OptionsResolver $resolver)

Class extends undeclared class \Symfony\Component\Form\AbstractType
Open

class ContentTypeChoiceType extends AbstractType

Call to method setDefaults from undeclared class \Symfony\Component\OptionsResolver\OptionsResolver
Open

        $resolver->setDefaults(

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

    protected $contentTypeRepository;

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 excessively long variable names like $contentTypeRepository. Keep variable name length under 20.
Open

        ContentTypeRepositoryInterface $contentTypeRepository,

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