Backoffice/BusinessRules/Strategies/BlockStrategy.php
Avoid unused parameters such as '$parameters'. Open
Open
public function canDelete(BlockInterface $block, array $parameters)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Open
return !$block->isTransverse() || 0 == $this->nodeRepository->countBlockUsed($block->getId());
- Create a ticketCreate a ticket
- Exclude checks
Call to method isTransverse
from undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
return !$block->isTransverse() || 0 == $this->nodeRepository->countBlockUsed($block->getId());
- Create a ticketCreate a ticket
- Exclude checks
Parameter $block
has undeclared type \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
public function canDelete(BlockInterface $block, array $parameters)
- Create a ticketCreate a ticket
- Exclude checks
Parameter $nodeRepository
has undeclared type \OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface
Open
Open
public function __construct(NodeRepositoryInterface $nodeRepository)
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ENTITY_TYPE
from undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
return BlockInterface::ENTITY_TYPE;
- Create a ticketCreate a ticket
- Exclude checks
Call to method getId
from undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
return !$block->isTransverse() || 0 == $this->nodeRepository->countBlockUsed($block->getId());
- Create a ticketCreate a ticket
- Exclude checks