Method __construct
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
NodeRepositoryInterface $nodeRepository,
SiteRepositoryInterface $siteRepository,
StatusRepositoryInterface $statusRepository,
BlockRepositoryInterface $blockRepository,
ContextBackOfficeInterface $contextManager,
- Create a ticketCreate a ticket
Function duplicateArea
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
protected function duplicateArea(NodeInterface $node, NodeInterface $newNode, $duplicateBlock = true)
{
foreach ($node->getAreas() as $areaId => $area) {
$newArea = clone $area;
$newNode->setArea($areaId, $newArea);
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method createNewErrorNode
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createNewErrorNode($nodeId, $name, $parentId, $siteId, $language, $template)
- Create a ticketCreate a ticket
Method createRootNode
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function createRootNode($siteId, $language, $name, $routePattern, $template)
- Create a ticketCreate a ticket
Function reorderNodes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function reorderNodes(array $orderedNodes, NodeInterface $parentNode)
{
foreach ($orderedNodes as $position => $nodeId) {
$nodeVersions = $this->nodeRepository->findByNodeAndSite($nodeId, $parentNode->getSiteId());
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function deleteBlockInNode
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function deleteBlockInNode(NodeInterface $node)
{
foreach ($node->getAreas() as $area) {
foreach ($area->getBlocks() as $block) {
if (!$block->isTransverse()) {
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
The method __construct has 11 parameters. Consider reducing the number of parameters to less than 10. Open
public function __construct(
NodeRepositoryInterface $nodeRepository,
SiteRepositoryInterface $siteRepository,
StatusRepositoryInterface $statusRepository,
BlockRepositoryInterface $blockRepository,
- Create a ticketCreate a ticket
- Exclude checks
The class NodeManager has a coupling between objects value of 16. Consider to reduce the number of dependencies under 13. Open
class NodeManager
{
protected $statusRepository;
protected $blockRepository;
protected $eventDispatcher;
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
CouplingBetweenObjects
Since: 1.1.0
A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability
Example
class Foo {
/**
* @var \foo\bar\X
*/
private $x = null;
/**
* @var \foo\bar\Y
*/
private $y = null;
/**
* @var \foo\bar\Z
*/
private $z = null;
public function setFoo(\Foo $foo) {}
public function setBar(\Bar $bar) {}
public function setBaz(\Baz $baz) {}
/**
* @return \SplObjectStorage
* @throws \OutOfRangeException
* @throws \InvalidArgumentException
* @throws \ErrorException
*/
public function process(\Iterator $it) {}
// ...
}
Source https://phpmd.org/rules/design.html#couplingbetweenobjects
Missing class import via use statement (line '308', column '21'). Open
$date = new \DateTime("now");
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
The method duplicateArea has a boolean flag argument $duplicateBlock, which is a certain sign of a Single Responsibility Principle violation. Open
protected function duplicateArea(NodeInterface $node, NodeInterface $newNode, $duplicateBlock = true)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method duplicateArea uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$newArea->addBlock($block);
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
The method initializeNode uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$node->setNodeId(NodeInterface::ROOT_NODE_ID);
}
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
ElseExpression
Since: 1.4.0
An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.
Example
class Foo
{
public function bar($flag)
{
if ($flag) {
// one branch
} else {
// another branch
}
}
}
Source https://phpmd.org/rules/cleancode.html#elseexpression
Expected @param annotation for name
to be before the @param annotation for parentId
Open
* @param string $parentId
- Create a ticketCreate a ticket
- Exclude checks
Call to method findOneByInitial
from undeclared class \OpenOrchestra\ModelInterface\Repository\StatusRepositoryInterface
Open
$status = $this->statusRepository->findOneByInitial();
- Create a ticketCreate a ticket
- Exclude checks
Call to method setVersionName
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setVersionName($versionName);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setName
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setName($name);
- Create a ticketCreate a ticket
- Exclude checks
Expected @param annotation for templateManager
to be before the @param annotation for nodeClass
Open
* @param string $nodeClass
- Create a ticketCreate a ticket
- Exclude checks
Parameter $statusRepository
has undeclared type \OpenOrchestra\ModelInterface\Repository\StatusRepositoryInterface
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Call to method setNodeType
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setNodeType(ReadNodeInterface::TYPE_ERROR);
- Create a ticketCreate a ticket
- Exclude checks
Parameter $blockRepository
has undeclared type \OpenOrchestra\ModelInterface\Repository\BlockRepositoryInterface
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParentId
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setParentId($parentId);
- Create a ticketCreate a ticket
- Exclude checks
Parameter $eventDispatcher
has undeclared type \Symfony\Component\EventDispatcher\EventDispatcherInterface
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Parameter $siteRepository
has undeclared type \OpenOrchestra\ModelInterface\Repository\SiteRepositoryInterface
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Call to method setStatus
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setStatus($status);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ROOT_NODE_ID
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node = $this->initializeNode(NodeInterface::ROOT_NODE_ID, $language, $siteId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setNodeId
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setNodeId($nodeId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setVersion
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setVersion($this->uniqueIdGenerator->generateUniqueId());
- Create a ticketCreate a ticket
- Exclude checks
Parameter $nodeRepository
has undeclared type \OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Parameter $originalNode
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function createNewVersionNode(NodeInterface $originalNode, $versionName = '')
- Create a ticketCreate a ticket
- Exclude checks
Return type of createNewVersionNode()
is undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function createNewVersionNode(NodeInterface $originalNode, $versionName = '')
- Create a ticketCreate a ticket
- Exclude checks
Parameter $tokenStorage
has undeclared type \Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage
Open
public function __construct(
- Create a ticketCreate a ticket
- Exclude checks
Return type of createNewErrorNode()
is undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function createNewErrorNode($nodeId, $name, $parentId, $siteId, $language, $template)
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant TYPE_ERROR
from undeclared class \OpenOrchestra\ModelInterface\Model\ReadNodeInterface
Open
$node->setNodeType(ReadNodeInterface::TYPE_ERROR);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setRoutePattern
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setRoutePattern($routePattern);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getNodeId
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$nodeVersion->setParentId($parentNode->getNodeId());
- Create a ticketCreate a ticket
- Exclude checks
Parameter $newNode
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
protected function duplicateArea(NodeInterface $node, NodeInterface $newNode, $duplicateBlock = true)
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if ($nodeVersion instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method setSitemapChangefreq
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setSitemapChangefreq(null);
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\NodeEvent
Open
$this->eventDispatcher->dispatch(NodeEvents::NODE_MOVE, new NodeEvent($nodeVersion));
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_ADD_LANGUAGE
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
$this->eventDispatcher->dispatch(NodeEvents::NODE_ADD_LANGUAGE, new NodeEvent($node));
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ROOT_NODE_ID
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setNodeId(NodeInterface::ROOT_NODE_ID);
- Create a ticketCreate a ticket
- Exclude checks
Parameter $node
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function setVersionName(NodeInterface $node)
- Create a ticketCreate a ticket
- Exclude checks
Call to method setVersionName
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setVersionName($versionName);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setInMenu
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setInMenu(false);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setMetaFollow
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setMetaFollow(false);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getPath
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setPath($parentNode->getPath());
- Create a ticketCreate a ticket
- Exclude checks
Call to method setArea
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setArea($areaName, new $this->areaClass());
- Create a ticketCreate a ticket
- Exclude checks
Call to method dispatch
from undeclared class \Symfony\Component\EventDispatcher\EventDispatcherInterface
Open
$this->eventDispatcher->dispatch(NodeEvents::NODE_CREATION, new NodeEvent($node));
- Create a ticketCreate a ticket
- Exclude checks
Parameter $node
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function deleteBlockInNode(NodeInterface $node)
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant POST_BLOCK_DELETE
from undeclared class \OpenOrchestra\ModelInterface\BlockEvents
Open
$this->eventDispatcher->dispatch(BlockEvents::POST_BLOCK_DELETE, new BlockEvent($block));
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant POST_BLOCK_CREATE
from undeclared class \OpenOrchestra\ModelInterface\BlockEvents
Open
$this->eventDispatcher->dispatch(BlockEvents::POST_BLOCK_CREATE, new BlockEvent($newBlock));
- Create a ticketCreate a ticket
- Exclude checks
Call to method setTemplate
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setTemplate($template);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setInMenu
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setInMenu(true);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getToken
from undeclared class \Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage
Open
$node->setCreatedBy($this->tokenStorage->getToken()->getUser()->getUsername());
- Create a ticketCreate a ticket
- Exclude checks
Call to method setOrder
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setOrder(-1);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setSeoTitle
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setSeoTitle(null);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setMetaIndex
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setMetaIndex(false);
- Create a ticketCreate a ticket
- Exclude checks
Call to method dispatch
from undeclared class \Symfony\Component\EventDispatcher\EventDispatcherInterface
Open
$this->eventDispatcher->dispatch(BlockEvents::POST_BLOCK_CREATE, new BlockEvent($newBlock));
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\AreaInterface
Open
if (! $node->getArea($areaName) instanceof AreaInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method setMetaDescription
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setMetaDescription(null);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant TYPE_DEFAULT
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$nodeType = NodeInterface::TYPE_DEFAULT;
- Create a ticketCreate a ticket
- Exclude checks
Return type of initializeAreasNode()
is undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function initializeAreasNode(NodeInterface $node)
- Create a ticketCreate a ticket
- Exclude checks
Call to method getTemplate
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$areasName = $this->templateManager->getTemplateAreas($node->getTemplate(), $templateSet);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setParentId
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$nodeVersion->setParentId($parentNode->getNodeId());
- Create a ticketCreate a ticket
- Exclude checks
Parameter $node
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function createNewLanguageNode(NodeInterface $node, $language)
- Create a ticketCreate a ticket
- Exclude checks
Call to method findOneByTranslationState
from undeclared class \OpenOrchestra\ModelInterface\Repository\StatusRepositoryInterface
Open
$status = $this->statusRepository->findOneByTranslationState();
- Create a ticketCreate a ticket
- Exclude checks
Call to method initializeKeywords
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->initializeKeywords();
- Create a ticketCreate a ticket
- Exclude checks
Call to method setTemplate
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setTemplate($oldNode->getTemplate());
- Create a ticketCreate a ticket
- Exclude checks
Call to method findInLastVersion
from undeclared class \OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface
Open
$parentNode = $this->nodeRepository->findInLastVersion($parentId, $language, $siteId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getArea
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if (! $node->getArea($areaName) instanceof AreaInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method setTemplate
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setTemplate($template);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_CREATION
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
$this->eventDispatcher->dispatch(NodeEvents::NODE_CREATION, new NodeEvent($node));
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ROOT_PARENT_ID
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node = $this->initializeNode(NodeInterface::ROOT_PARENT_ID, $language, $siteId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getSiteId
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$site = $this->siteRepository->findOneBySiteId($node->getSiteId());
- Create a ticketCreate a ticket
- Exclude checks
Call to method getName
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$versionName = $node->getName() . '_' . $date->format("Y-m-d_H:i:s");
- Create a ticketCreate a ticket
- Exclude checks
Parameter $parentNode
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function reorderNodes(array $orderedNodes, NodeInterface $parentNode)
- Create a ticketCreate a ticket
- Exclude checks
Call to method getSiteId
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$nodeVersions = $this->nodeRepository->findByNodeAndSite($nodeId, $parentNode->getSiteId());
- Create a ticketCreate a ticket
- Exclude checks
Call to method setOrder
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$nodeVersion->setOrder($position);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setInFooter
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setInFooter(false);
- Create a ticketCreate a ticket
- Exclude checks
Return type of hydrateNodeFromNodeId()
is undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function hydrateNodeFromNodeId(NodeInterface $node, $nodeId)
- Create a ticketCreate a ticket
- Exclude checks
Return type of duplicateArea()
is undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
protected function duplicateArea(NodeInterface $node, NodeInterface $newNode, $duplicateBlock = true)
- Create a ticketCreate a ticket
- Exclude checks
Return type of initializeNode()
is undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function initializeNode($parentId, $language, $siteId, $order = 0)
- Create a ticketCreate a ticket
- Exclude checks
Call to method getNodeId
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if ($nodeVersions[0]->getParentId() !== $parentNode->getNodeId()) {
- Create a ticketCreate a ticket
- Exclude checks
Parameter $parentNode
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
protected function moveNodeVersions(array $nodeVersions, NodeInterface $parentNode)
- Create a ticketCreate a ticket
- Exclude checks
Call to method setLanguage
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setLanguage($language);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getDocumentManager
from undeclared class \OpenOrchestra\ModelInterface\Repository\BlockRepositoryInterface
Open
$this->blockRepository->getDocumentManager()->remove($block);
- Create a ticketCreate a ticket
- Exclude checks
Call to method dispatch
from undeclared class \Symfony\Component\EventDispatcher\EventDispatcherInterface
Open
$this->eventDispatcher->dispatch(BlockEvents::POST_BLOCK_DELETE, new BlockEvent($block));
- Create a ticketCreate a ticket
- Exclude checks
Parameter $node
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
protected function duplicateArea(NodeInterface $node, NodeInterface $newNode, $duplicateBlock = true)
- Create a ticketCreate a ticket
- Exclude checks
Call to method getAreas
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
foreach ($node->getAreas() as $areaId => $area) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method getDocumentManager
from undeclared class \OpenOrchestra\ModelInterface\Repository\BlockRepositoryInterface
Open
$this->blockRepository->getDocumentManager()->persist($newBlock);
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if ($parentNode instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method findByNodeAndSite
from undeclared class \OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface
Open
$nodeVersions = $this->nodeRepository->findByNodeAndSite($nodeId, $parentNode->getSiteId());
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if ($nodeVersion instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method setStatus
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setStatus($status);
- Create a ticketCreate a ticket
- Exclude checks
Call to method dispatch
from undeclared class \Symfony\Component\EventDispatcher\EventDispatcherInterface
Open
$this->eventDispatcher->dispatch(NodeEvents::NODE_ADD_LANGUAGE, new NodeEvent($node));
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\BlockEvent
Open
$this->eventDispatcher->dispatch(BlockEvents::POST_BLOCK_DELETE, new BlockEvent($block));
- Create a ticketCreate a ticket
- Exclude checks
Call to method findInLastVersion
from undeclared class \OpenOrchestra\ModelInterface\Repository\NodeRepositoryInterface
Open
$oldNode = $this->nodeRepository->findInLastVersion($nodeId, $node->getLanguage(), $siteId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setArea
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setArea($areaId, $newArea);
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\BlockEvent
Open
$this->eventDispatcher->dispatch(BlockEvents::POST_BLOCK_CREATE, new BlockEvent($newBlock));
- Create a ticketCreate a ticket
- Exclude checks
Call to method setName
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setName($name);
- Create a ticketCreate a ticket
- Exclude checks
Call to method findOneByInitial
from undeclared class \OpenOrchestra\ModelInterface\Repository\StatusRepositoryInterface
Open
$status = $this->statusRepository->findOneByInitial();
- Create a ticketCreate a ticket
- Exclude checks
Return type of setVersionName()
is undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function setVersionName(NodeInterface $node)
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\NodeEvent
Open
$this->eventDispatcher->dispatch(NodeEvents::NODE_CREATION, new NodeEvent($node));
- Create a ticketCreate a ticket
- Exclude checks
Call to method setVersion
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setVersion($this->uniqueIdGenerator->generateUniqueId());
- Create a ticketCreate a ticket
- Exclude checks
Call to method setSitemapPriority
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$newNode->setSitemapPriority(null);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant MAX_AGE
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setMaxAge(NodeInterface::MAX_AGE);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getNodeType
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$nodeType = $parentNode->getNodeType();
- Create a ticketCreate a ticket
- Exclude checks
Parameter $node
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function initializeAreasNode(NodeInterface $node)
- Create a ticketCreate a ticket
- Exclude checks
Parameter $node
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function hydrateNodeFromNodeId(NodeInterface $node, $nodeId)
- Create a ticketCreate a ticket
- Exclude checks
Return type of createNewLanguageNode()
is undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function createNewLanguageNode(NodeInterface $node, $language)
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\NodeEvent
Open
$this->eventDispatcher->dispatch(NodeEvents::NODE_ADD_LANGUAGE, new NodeEvent($node));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getAreas
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
foreach ($node->getAreas() as $area) {
- Create a ticketCreate a ticket
- Exclude checks
Return type of createRootNode()
is undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function createRootNode($siteId, $language, $name, $routePattern, $template)
- Create a ticketCreate a ticket
- Exclude checks
Call to method findOneBySiteId
from undeclared class \OpenOrchestra\ModelInterface\Repository\SiteRepositoryInterface
Open
$site = $this->siteRepository->findOneBySiteId($node->getSiteId());
- Create a ticketCreate a ticket
- Exclude checks
Call to method getLanguage
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$oldNode = $this->nodeRepository->findInLastVersion($nodeId, $node->getLanguage(), $siteId);
- Create a ticketCreate a ticket
- Exclude checks
Call to method setInFooter
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setInFooter(true);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_MOVE
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
$this->eventDispatcher->dispatch(NodeEvents::NODE_MOVE, new NodeEvent($nodeVersion));
- Create a ticketCreate a ticket
- Exclude checks
Call to method dispatch
from undeclared class \Symfony\Component\EventDispatcher\EventDispatcherInterface
Open
$this->eventDispatcher->dispatch(NodeEvents::NODE_MOVE, new NodeEvent($nodeVersion));
- Create a ticketCreate a ticket
- Exclude checks
There must be a single space between the closing parenthesis and the opening brace of a multi-line function declaration; found 0 spaces Open
){
- Create a ticketCreate a ticket
- Exclude checks
Expected 1 space after FOREACH keyword; 0 found Open
foreach($areasName as $areaName) {
- Create a ticketCreate a ticket
- Exclude checks