open-orchestra/open-orchestra-cms-bundle

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

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$parameters'.
Open

    public function canDelete(BlockInterface $block, 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

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

        return !$block->isTransverse() || 0 == $this->nodeRepository->countBlockUsed($block->getId());

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

        return !$block->isTransverse() || 0 == $this->nodeRepository->countBlockUsed($block->getId());

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

    public function canDelete(BlockInterface $block, array $parameters)

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

    public function __construct(NodeRepositoryInterface $nodeRepository)

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

        return BlockInterface::ENTITY_TYPE;

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

        return !$block->isTransverse() || 0 == $this->nodeRepository->countBlockUsed($block->getId());

There are no issues that match your filters.

Category
Status