open-orchestra/open-orchestra-cms-bundle

View on GitHub
Backoffice/BusinessRules/Strategies/ContentTypeStrategy.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$parameters'.
Open

    public function canDelete(ContentTypeInterface $contentType, array $parameters)

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

Avoid unused parameters such as '$parameters'.
Open

    public function canReadList(ContentTypeInterface $contentType, array $parameters)

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

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

    public function __construct(

Call to method countByContentType from undeclared class \OpenOrchestra\ModelInterface\Repository\ContentRepositoryInterface
Open

        return 0 == $this->contentRepository->countByContentType($contentType->getContentTypeId());

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

        return in_array($contentType->getContentTypeId(), $site->getContentTypes());

Parameter $contentRepository has undeclared type \OpenOrchestra\ModelInterface\Repository\ContentRepositoryInterface
Open

    public function __construct(

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

        return ContentTypeInterface::ENTITY_TYPE;

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

        return 0 == $this->contentRepository->countByContentType($contentType->getContentTypeId());

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

    public function canReadList(ContentTypeInterface $contentType, array $parameters)

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

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

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

    public function canDelete(ContentTypeInterface $contentType, array $parameters)

PHP keywords must be lowercase; expected "const" but found "CONST"
Open

    CONST READ_LIST = 'READ_LIST';

There are no issues that match your filters.

Category
Status