open-orchestra/open-orchestra-cms-bundle

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

Summary

Maintainability
A
0 mins
Test Coverage

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

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

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

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

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

    public function configureOptions(OptionsResolver $resolver)

Parameter $siteRepository has undeclared type \OpenOrchestra\ModelInterface\Repository\SiteRepositoryInterface
Open

    public function __construct(

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()

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

class SiteContentTypeChoiceType extends AbstractType

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

        $resolver->setDefaults(

Call to method findOneBySiteId from undeclared class \OpenOrchestra\ModelInterface\Repository\SiteRepositoryInterface
Open

        $site = $this->siteRepository->findOneBySiteId($siteId);

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

            return $element->getName($currentLanguage);

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