open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/Manager/KeywordToDocumentManager.php

Summary

Maintainability
A
0 mins
Test Coverage

Reference to undeclared property \OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager->keywordRepository
Open

            $this->keywordRepository->getManager()->flush($keywordEntity);

Parameter $keywordRepository has undeclared type \OpenOrchestra\ModelInterface\Repository\KeywordRepositoryInterface
Open

    public function __construct(

Reference to undeclared property \OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager->keywordRepository
Open

        $keywordEntity = $this->keywordRepository->findOneByLabel($keyword);

Reference to undeclared property \OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager->keywordClass (Did you mean $keywordClass)
Open

        $this->keywordClass = $keywordClass;

Reference to undeclared property \OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager->authorizationChecker (Did you mean $authorizationChecker)
Open

        $this->authorizationChecker = $authorizationChecker;

Parameter $authorizationChecker has undeclared type \Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface
Open

    public function __construct(

Reference to undeclared property \OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager->suppressSpecialCharacterHelper
Open

        $keyword = $this->suppressSpecialCharacterHelper->transform($keyword);

Parameter $suppressSpecialCharacterHelper has undeclared type \OpenOrchestra\ModelInterface\Helper\SuppressSpecialCharacterHelperInterface
Open

    public function __construct(

Reference to undeclared property \OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager->keywordClass
Open

        $keywordClass = $this->keywordClass;

Reference to undeclared property \OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager->keywordRepository (Did you mean $keywordRepository)
Open

        $this->keywordRepository = $keywordRepository;

Return type of getDocument() is undeclared type \OpenOrchestra\ModelInterface\Model\KeywordInterface
Open

    public function getDocument($keyword)

Reference to constant ENTITY_TYPE from undeclared class \OpenOrchestra\ModelInterface\Model\KeywordInterface
Open

            && !$this->authorizationChecker->isGranted(ContributionActionInterface::CREATE, KeywordInterface::ENTITY_TYPE)

Call to method __construct from undeclared class \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
Open

            throw new AccessDeniedHttpException();

Reference to undeclared property \OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager->keywordRepository
Open

            $this->keywordRepository->getManager()->persist($keywordEntity);

Reference to undeclared property \OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager->authorizationChecker
Open

            && !$this->authorizationChecker->isGranted(ContributionActionInterface::CREATE, KeywordInterface::ENTITY_TYPE)

Reference to undeclared property \OpenOrchestra\Backoffice\Manager\KeywordToDocumentManager->suppressSpecialCharacterHelper (Did you mean $suppressSpecialCharacterHelper)
Open

        $this->suppressSpecialCharacterHelper = $suppressSpecialCharacterHelper;

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

        SuppressSpecialCharacterHelperInterface $suppressSpecialCharacterHelper,

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 a single space between the closing parenthesis and the opening brace of a multi-line function declaration; found 0 spaces
Open

    ){

Line exceeds 120 characters; contains 122 characters
Open

            && !$this->authorizationChecker->isGranted(ContributionActionInterface::CREATE, KeywordInterface::ENTITY_TYPE)

There are no issues that match your filters.

Category
Status