File NodeController.php
has 365 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace OpenOrchestra\ApiBundle\Controller;
use Doctrine\Common\Collections\ArrayCollection;
- Create a ticketCreate a ticket
The class NodeController has an overall complexity of 53 which is very high. The configured complexity threshold is 50. Open
class NodeController extends BaseController
{
use ListStatus;
/**
- Create a ticketCreate a ticket
- Exclude checks
The class NodeController has 17 public methods. Consider refactoring NodeController to keep number of public methods under 10. Open
class NodeController extends BaseController
{
use ListStatus;
/**
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
TooManyPublicMethods
Since: 0.1
A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.
By default it ignores methods starting with 'get' or 'set'.
Example
Source https://phpmd.org/rules/codesize.html#toomanypublicmethods
Method changeStatusAction
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function changeStatusAction(Request $request, $saveOldPublishedVersion)
{
$facade = $this->get('jms_serializer')->deserialize(
$request->getContent(),
'OpenOrchestra\ApiBundle\Facade\NodeFacade',
- Create a ticketCreate a ticket
Function changeStatusAction
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function changeStatusAction(Request $request, $saveOldPublishedVersion)
{
$facade = $this->get('jms_serializer')->deserialize(
$request->getContent(),
'OpenOrchestra\ApiBundle\Facade\NodeFacade',
- 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 updateBlockPositionAction
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function updateBlockPositionAction(Request $request, $nodeId, $language, $version, $siteId)
{
$node = $this->findOneNode($nodeId, $language, $siteId, $version);
if (!$node instanceof NodeInterface) {
throw new NodeNotFoundHttpException();
- Create a ticketCreate a ticket
Method deleteBlockInAreaAction
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function deleteBlockInAreaAction($nodeId, $siteId, $language, $version, $blockId, $areaName)
- Create a ticketCreate a ticket
Method addBlockInAreaAction
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function addBlockInAreaAction($nodeId, $language, $version, $blockId, $areaId, $position)
- Create a ticketCreate a ticket
Method updateBlockPositionAction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function updateBlockPositionAction(Request $request, $nodeId, $language, $version, $siteId)
- Create a ticketCreate a ticket
Method copyTranslatedBlocksInAreaAction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function copyTranslatedBlocksInAreaAction(Request $request, $nodeId, $language, $version, $areaId)
- Create a ticketCreate a ticket
The class NodeController has a coupling between objects value of 25. Consider to reduce the number of dependencies under 13. Open
class NodeController extends BaseController
{
use ListStatus;
/**
- 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
Avoid using static access to class '\OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration' in method 'listAction'. Open
$configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration' in method 'listUsageBlockAction'. Open
$configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
@throws annotation of showAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotFoundHttpException,
which does not extend Error/Exception Open
public function showAction($nodeId, $siteId, $language, $version)
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ADD_BLOCK_TO_NODE
from undeclared class \OpenOrchestra\ModelInterface\BlockNodeEvents
Open
$this->dispatchEvent(BlockNodeEvents::ADD_BLOCK_TO_NODE, new BlockNodeEvent($node, $block));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$objectManager = $this->get('object_manager');
- Create a ticketCreate a ticket
- Exclude checks
Call to method get
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->get('_format', 'json')
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\NodeEvent
Open
$this->dispatchEvent(NodeEvents::NODE_DUPLICATE, new NodeEvent($newNode));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
return $this->get('open_orchestra_api.transformer_manager')->transform('node_collection', $nodes);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ROOT_PARENT_ID
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
public function listTreeNodeAction($siteId, $language, $parentId = NodeInterface::ROOT_PARENT_ID)
- Create a ticketCreate a ticket
- Exclude checks
Argument 4 (version)
is string
but \OpenOrchestra\ApiBundle\Controller\NodeController::findOneNode()
takes int|null
defined at /code/ApiBundle/Controller/NodeController.php:701
Open
$node = $this->findOneNode($nodeId, $language, $siteId, $version);
- Create a ticketCreate a ticket
- Exclude checks
Return type of deleteAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
public function deleteAction($nodeId)
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if (!$node instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Argument 4 (version)
is string
but \OpenOrchestra\ApiBundle\Controller\NodeController::findOneNode()
takes int|null
defined at /code/ApiBundle/Controller/NodeController.php:701
Open
$node = $this->findOneNode($nodeId, $language, $siteId, $version);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
return $this->get('open_orchestra_api.transformer_manager')->transform('node', $node);
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of updateBlockPositionAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotFoundHttpException,
which does not extend Error/Exception Open
public function updateBlockPositionAction(Request $request, $nodeId, $language, $version, $siteId)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::dispatchEvent
Open
$this->dispatchEvent(NodeEvents::NODE_DUPLICATE, new NodeEvent($newNode));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$nodes = $this->get('open_orchestra_model.repository.node')->findByHistoryAndSiteId(
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but listTreeNodeAction()
is declared to return \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
return $this->get('open_orchestra_api.transformer_manager')->transform('nodes_tree', $nodes);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$this->get('open_orchestra_api.transformer_manager')->reverseTransform('node', $facade, array('source' => $node));
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_CHANGE_STATUS
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
$this->dispatchEvent(NodeEvents::NODE_CHANGE_STATUS, $event);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
return $this->get('open_orchestra_api.transformer_manager')->transform('node', $node);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::dispatchEvent
Open
$this->dispatchEvent(NodeEvents::NODE_UPDATE_BLOCK_POSITION, new NodeEvent($node, null, $updatedBlock));
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContent
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->getContent(),
- Create a ticketCreate a ticket
- Exclude checks
Call to method getLanguage
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->getLanguage(),
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::denyAccessUnlessGranted
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::READ, $node);
- Create a ticketCreate a ticket
- Exclude checks
Possibly zero references to use statement for classlike/namespace Config
(\Sensio\Bundle\FrameworkExtraBundle\Configuration)
Open
use Sensio\Bundle\FrameworkExtraBundle\Configuration as Config;
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::denyAccessUnlessGranted
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::READ, $node);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$siteId = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getSiteId();
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$nodeRepository = $this->get('open_orchestra_model.repository.node');
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but deleteBlockInAreaAction()
is declared to return \Symfony\Component\HttpFoundation\Response
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
Call to method get
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->get('_format', 'json')
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if (!$node instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Suspicious array access to \Doctrine\Common\Collections\ArrayCollection
Open
$blocks[] = $block;
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::denyAccessUnlessGranted
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::EDIT, $originalNodeVersion);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$nodeManager = $this->get('open_orchestra_backoffice.manager.node');
- Create a ticketCreate a ticket
- Exclude checks
Call to method get
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->get('_format', 'json')
- Create a ticketCreate a ticket
- Exclude checks
Call to method getStatus
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$status = $node->getStatus();
- Create a ticketCreate a ticket
- Exclude checks
Call to method getSiteId
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->getSiteId()
- Create a ticketCreate a ticket
- Exclude checks
Argument 4 (version)
is string
but \OpenOrchestra\ApiBundle\Controller\NodeController::findOneNode()
takes int|null
defined at /code/ApiBundle/Controller/NodeController.php:701
Open
$node = $this->findOneNode($nodeId, $language, $siteId, $version);
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but deleteAction()
is declared to return \Symfony\Component\HttpFoundation\Response
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$block = $this->get('open_orchestra_model.repository.block')->findById($blockId);
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of addBlockInAreaAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\BlockNotFoundHttpException,
which does not extend Error/Exception Open
public function addBlockInAreaAction($nodeId, $language, $version, $blockId, $areaId, $position)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$objectManager = $this->get('object_manager');
- Create a ticketCreate a ticket
- Exclude checks
Call to method get
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->get('_format', 'json')
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContent
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->getContent(),
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_UPDATE_BLOCK_POSITION
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
$this->dispatchEvent(NodeEvents::NODE_UPDATE_BLOCK_POSITION, new NodeEvent($node, null, $updatedBlock));
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of newVersionAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotFoundHttpException,
which does not extend Error/Exception Open
public function newVersionAction(Request $request, $nodeId, $language, $originalVersion)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$block = $this->get('open_orchestra_model.repository.block')->findById($block->id);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$siteId = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getSiteId();
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_DUPLICATE
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
$this->dispatchEvent(NodeEvents::NODE_DUPLICATE, new NodeEvent($newNode));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$nodeRepository = $this->get('open_orchestra_model.repository.node');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$facade = $this->get('jms_serializer')->deserialize(
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but newVersionAction()
is declared to return \Symfony\Component\HttpFoundation\Response
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
Return type of listStatusesForNodeAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
public function listStatusesForNodeAction($nodeId, $language, $siteId, $version)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
return $this->get('open_orchestra_api.transformer_manager')->transform('node_collection', $nodes);
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if ($oldPublishedVersion instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Argument 1 (document)
is \OpenOrchestra\ModelInterface\Model\NodeInterface
but \OpenOrchestra\ApiBundle\Controller\NodeController::listStatuses()
takes \OpenOrchestra\ModelInterface\Model\StatusableInterface
defined at /code/ApiBundle/Controller/ControllerTrait/ListStatus.php:17
Open
return $this->listStatuses($node);
- Create a ticketCreate a ticket
- Exclude checks
Returning type \OpenOrchestra\WorkflowAdminBundle\Facade\StatusCollectionFacade
but listStatusesForNodeAction()
is declared to return \Symfony\Component\HttpFoundation\Response
Open
return $this->listStatuses($node);
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if (!$node instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of copyTranslatedBlocksInAreaAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\AreaNotFoundHttpException,
which does not extend Error/Exception Open
public function copyTranslatedBlocksInAreaAction(Request $request, $nodeId, $language, $version, $areaId)
- Create a ticketCreate a ticket
- Exclude checks
Argument 4 (version)
is string
but \OpenOrchestra\ApiBundle\Controller\NodeController::findOneNode()
takes int|null
defined at /code/ApiBundle/Controller/NodeController.php:701
Open
$node = $this->findOneNode($nodeId, $language, $siteId, $version);
- Create a ticketCreate a ticket
- Exclude checks
Return type of updateBlockPositionAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
public function updateBlockPositionAction(Request $request, $nodeId, $language, $version, $siteId)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$facade = $this->get('jms_serializer')->deserialize(
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$nodes = $this->get('open_orchestra_model.repository.node')->findTreeNode($siteId, $language, $parentId);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$siteId = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getSiteId();
- Create a ticketCreate a ticket
- Exclude checks
Call to method getNodeId
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->getNodeId(),
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$siteId = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getSiteId();
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
public function updateBlockPositionAction(Request $request, $nodeId, $language, $version, $siteId)
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but updateBlockPositionAction()
is declared to return \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
Argument 4 (version)
is string
but \OpenOrchestra\ApiBundle\Controller\NodeController::findOneNode()
takes int|null
defined at /code/ApiBundle/Controller/NodeController.php:701
Open
$originalNodeVersion = $this->findOneNode($nodeId, $language, $siteId, $originalVersion);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::isGranted
Open
if (!$this->isGranted($status, $nodeSource)) {
- Create a ticketCreate a ticket
- Exclude checks
Possibly zero references to use statement for classlike/namespace Api
(\OpenOrchestra\BaseApiBundle\Controller\Annotation)
Open
use OpenOrchestra\BaseApiBundle\Controller\Annotation as Api;
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseApiBundle\Controller\BaseController
Open
class NodeController extends BaseController
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::denyAccessUnlessGranted
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::DELETE, $node);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::EDIT, $node)) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
if ($this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::DELETE, $block)) {
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
if (!$block instanceof BlockInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method getArea
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if (!array_key_exists($areaId, $facade->getAreas()) || null === $node->getArea($areaId)) {
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_CREATION
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
array(NodeEvents::NODE_CREATION, NodeEvents::NODE_UPDATE),
- Create a ticketCreate a ticket
- Exclude checks
Return type of deleteBlockInAreaAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
public function deleteBlockInAreaAction($nodeId, $siteId, $language, $version, $blockId, $areaName)
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\BlockEvent
Open
$this->dispatchEvent(BlockEvents::POST_BLOCK_DELETE, new BlockEvent($block));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::EDIT, $node)) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::denyAccessUnlessGranted
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::EDIT, $node);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::getParameter
Open
$areaClass = $this->getParameter('open_orchestra_model.document.area.class');
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\NodeEvent
Open
$this->dispatchEvent(NodeEvents::NODE_UPDATE_BLOCK_POSITION, new NodeEvent($node, null, $updatedBlock));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$siteId = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getSiteId();
- Create a ticketCreate a ticket
- Exclude checks
Return type of listTreeNodeAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
public function listTreeNodeAction($siteId, $language, $parentId = NodeInterface::ROOT_PARENT_ID)
- Create a ticketCreate a ticket
- Exclude checks
Return type of changeStatusAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
public function changeStatusAction(Request $request, $saveOldPublishedVersion)
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\NodeEvent
Open
$event = new NodeEvent($node, $nodeSource->getStatus());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(NodeStrategy::DELETE_VERSION, $node)
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
public function listUsageBlockAction(Request $request, $siteId, $language, $blockId)
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ADD_BLOCK_TO_NODE
from undeclared class \OpenOrchestra\ModelInterface\BlockNodeEvents
Open
$this->dispatchEvent(BlockNodeEvents::ADD_BLOCK_TO_NODE, new BlockNodeEvent($node, $blockToTranslate));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::dispatchEvent
Open
$this->dispatchEvent(BlockNodeEvents::ADD_BLOCK_TO_NODE, new BlockNodeEvent($node, $blockToTranslate));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::dispatchEvent
Open
$this->dispatchEvent(NodeEvents::NODE_DELETE, new NodeDeleteEvent($nodeId, $siteId));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$this->get('open_orchestra_model.repository.node')->removeBlockInArea($blockId, $areaName, $nodeId, $siteId, $language, $version);
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but deleteBlockInAreaAction()
is declared to return \Symfony\Component\HttpFoundation\Response
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of addBlockInAreaAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotEditableException,
which does not extend Error/Exception Open
public function addBlockInAreaAction($nodeId, $language, $version, $blockId, $areaId, $position)
- Create a ticketCreate a ticket
- Exclude checks
Return type of addBlockInAreaAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
public function addBlockInAreaAction($nodeId, $language, $version, $blockId, $areaId, $position)
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if (!$node instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method getArea
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$area = $node->getArea($areaId);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::dispatchEvent
Open
$this->dispatchEvent(BlockNodeEvents::ADD_BLOCK_TO_NODE, new BlockNodeEvent($node, $block));
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but addBlockInAreaAction()
is declared to return \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if (!$node instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$facade = $this->get('jms_serializer')->deserialize(
- Create a ticketCreate a ticket
- Exclude checks
Return type of listVersionAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
public function listVersionAction($nodeId, $language)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
return $this->get('open_orchestra_api.transformer_manager')->transform('node_collection', $nodes);
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
public function changeStatusAction(Request $request, $saveOldPublishedVersion)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::denyAccessUnlessGranted
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::EDIT, $node);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$this->get('object_manager')->flush();
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but changeStatusAction()
is declared to return \Symfony\Component\HttpFoundation\Response
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
Expected @param annotation for language
to be before the @param annotation for siteId
Open
* @param string $siteId
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
public function deleteNodeVersionsAction(Request $request)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$facade = $this->get('jms_serializer')->deserialize(
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$blockToTranslate = $this->get('open_orchestra_backoffice.manager.block')->createToTranslateBlock($block, $language);
- Create a ticketCreate a ticket
- Exclude checks
Expected @param annotation for blockId
to be before the @param annotation for areaName
Open
* @param string $areaName
- Create a ticketCreate a ticket
- Exclude checks
Return type of newVersionAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
public function newVersionAction(Request $request, $nodeId, $language, $originalVersion)
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of listStatusesForNodeAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotFoundHttpException,
which does not extend Error/Exception Open
public function listStatusesForNodeAction($nodeId, $language, $siteId, $version)
- Create a ticketCreate a ticket
- Exclude checks
Return type of updateChildrenOrderAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
public function updateChildrenOrderAction(Request $request, $nodeId)
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of deleteAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotDeletableException,
which does not extend Error/Exception Open
public function deleteAction($nodeId)
- Create a ticketCreate a ticket
- Exclude checks
Argument 4 (version)
is string
but \OpenOrchestra\ApiBundle\Controller\NodeController::findOneNode()
takes int|null
defined at /code/ApiBundle/Controller/NodeController.php:701
Open
$node = $this->findOneNode($nodeId, $language, $siteId, $version);
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of addBlockInAreaAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotFoundHttpException,
which does not extend Error/Exception Open
public function addBlockInAreaAction($nodeId, $language, $version, $blockId, $areaId, $position)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$block = $this->get('open_orchestra_model.repository.block')->findById($blockId);
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
public function copyTranslatedBlocksInAreaAction(Request $request, $nodeId, $language, $version, $areaId)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::EDIT, $node)) {
- Create a ticketCreate a ticket
- Exclude checks
Return type of listNodeWithBlockInAreaAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
public function listNodeWithBlockInAreaAction($nodeId, $siteId, $areaId)
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of changeStatusAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\StatusChangeNotGrantedHttpException,
which does not extend Error/Exception Open
public function changeStatusAction(Request $request, $saveOldPublishedVersion)
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if (!$node instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method getStatus
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$event = new NodeEvent($node, $nodeSource->getStatus());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$this->get('object_manager')->flush();
- Create a ticketCreate a ticket
- Exclude checks
Return type of listAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
public function listAction(Request $request, $siteId, $language)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$this->get('object_manager')->flush();
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$facade = $this->get('open_orchestra_api.transformer_manager')->transform('node_collection', $collection);
- Create a ticketCreate a ticket
- Exclude checks
Return type of showAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
public function showAction($nodeId, $siteId, $language, $version)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::DELETE, $node)) {
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_DELETE
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
$this->dispatchEvent(NodeEvents::NODE_DELETE, new NodeDeleteEvent($nodeId, $siteId));
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\NodeDeleteEvent
Open
$this->dispatchEvent(NodeEvents::NODE_DELETE, new NodeDeleteEvent($nodeId, $siteId));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$objectManager = $this->get('object_manager');
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant POST_BLOCK_DELETE
from undeclared class \OpenOrchestra\ModelInterface\BlockEvents
Open
$this->dispatchEvent(BlockEvents::POST_BLOCK_DELETE, new BlockEvent($block));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::dispatchEvent
Open
$this->dispatchEvent(BlockEvents::POST_BLOCK_DELETE, new BlockEvent($block));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$siteId = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getSiteId();
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::denyAccessUnlessGranted
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::EDIT, $node);
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of copyTranslatedBlocksInAreaAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotFoundHttpException,
which does not extend Error/Exception Open
public function copyTranslatedBlocksInAreaAction(Request $request, $nodeId, $language, $version, $areaId)
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of updateBlockPositionAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotEditableException,
which does not extend Error/Exception Open
public function updateBlockPositionAction(Request $request, $nodeId, $language, $version, $siteId)
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContent
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->getContent(),
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \Doctrine\Common\Collections\ArrayCollection
Open
$blocks = new ArrayCollection();
- Create a ticketCreate a ticket
- Exclude checks
Call to method setArea
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->setArea($key, $area);
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of changeStatusAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotFoundHttpException,
which does not extend Error/Exception Open
public function changeStatusAction(Request $request, $saveOldPublishedVersion)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$nodeRepository = $this->get('open_orchestra_model.repository.node');
- Create a ticketCreate a ticket
- Exclude checks
Call to method getStatus
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if ($status !== $nodeSource->getStatus()) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContent
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->getContent(),
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\NodeEvent
Open
$this->dispatchEvent(NodeEvents::NODE_DELETE_VERSION, new NodeEvent($node));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
return $this->get('open_orchestra_model.repository.node')->findInLastVersion($nodeId, $language, $siteId);
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
if (!$block instanceof BlockInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\BlockNodeEvent
Open
$this->dispatchEvent(BlockNodeEvents::ADD_BLOCK_TO_NODE, new BlockNodeEvent($node, $block));
- Create a ticketCreate a ticket
- Exclude checks
Return type of copyTranslatedBlocksInAreaAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
public function copyTranslatedBlocksInAreaAction(Request $request, $nodeId, $language, $version, $areaId)
- Create a ticketCreate a ticket
- Exclude checks
Argument 4 (version)
is string
but \OpenOrchestra\ApiBundle\Controller\NodeController::findOneNode()
takes int|null
defined at /code/ApiBundle/Controller/NodeController.php:701
Open
$node = $this->findOneNode($nodeId, $language, $siteId, $version);
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
public function newVersionAction(Request $request, $nodeId, $language, $originalVersion)
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContent
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->getContent(),
- Create a ticketCreate a ticket
- Exclude checks
Return type of listNodeByAuthorAndSiteIdAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
public function listNodeByAuthorAndSiteIdAction($published)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$nodes = $this->get('open_orchestra_model.repository.node')->findNotDeletedSortByUpdatedAt($nodeId, $language, $siteId);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(NodeStrategy::CHANGE_STATUS, $node)) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::dispatchEvent
Open
$this->dispatchEvent(NodeEvents::NODE_CHANGE_STATUS, $event);
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if (!$node instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$facade = $this->get('jms_serializer')->deserialize(
- Create a ticketCreate a ticket
- Exclude checks
Call to method get
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->get('_format', 'json')
- Create a ticketCreate a ticket
- Exclude checks
Call to method generateFromRequest
from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open
$configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
- Create a ticketCreate a ticket
- Exclude checks
Return type of findOneNode()
is undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
protected function findOneNode($nodeId, $language, $siteId, $version = null)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$this->get('open_orchestra_backoffice.manager.node')->deleteBlockInNode($node);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
return $this->get('open_orchestra_model.repository.node')->findVersionNotDeleted($nodeId, $language, $siteId, $version);
- Create a ticketCreate a ticket
- Exclude checks
@throws annotation of deleteBlockInAreaAction
has suspicious class type \OpenOrchestra\ApiBundle\Exceptions\HttpException\NodeNotFoundHttpException,
which does not extend Error/Exception Open
public function deleteBlockInAreaAction($nodeId, $siteId, $language, $version, $blockId, $areaName)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::denyAccessUnlessGranted
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::EDIT, $node);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::denyAccessUnlessGranted
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::EDIT, $node);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$area = $this->get('open_orchestra_api.transformer_manager')->reverseTransform('area', $areaFacade);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$facade = $this->get('jms_serializer')->deserialize(
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$this->get('object_manager')->flush();
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
if (!$originalNodeVersion instanceof NodeInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$objectManager = $this->get('object_manager');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$user = $this->get('security.token_storage')->getToken()->getUser();
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_UPDATE
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
array(NodeEvents::NODE_CREATION, NodeEvents::NODE_UPDATE),
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$this->get('object_manager')->remove($oldPublishedVersion);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::denyAccessUnlessGranted
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::EDIT, $node);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getContent
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$request->getContent(),
- Create a ticketCreate a ticket
- Exclude checks
Call to method getArea
from undeclared class \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
$node->getArea($areaId)->addBlock($blockToTranslate);
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
public function updateChildrenOrderAction(Request $request, $nodeId)
- Create a ticketCreate a ticket
- Exclude checks
Return type of deleteNodeVersionsAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
public function deleteNodeVersionsAction(Request $request)
- Create a ticketCreate a ticket
- Exclude checks
Call to method generateFromRequest
from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open
$configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$objectManager = $this->get('object_manager');
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
public function listAction(Request $request, $siteId, $language)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$facade = $this->get('open_orchestra_api.transformer_manager')->transform('node_collection', $collection);
- Create a ticketCreate a ticket
- Exclude checks
Call to method get
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
$format = $request->get('_format', 'json');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$nodes = $this->get('open_orchestra_api.transformer_manager')->reverseTransform('node_collection', $facade);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$nodeRepository = $this->get('open_orchestra_model.repository.node');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::isGranted
Open
if ($this->isGranted(ContributionActionInterface::DELETE, $node) &&
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant NODE_DELETE_VERSION
from undeclared class \OpenOrchestra\ModelInterface\NodeEvents
Open
$this->dispatchEvent(NodeEvents::NODE_DELETE_VERSION, new NodeEvent($node));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::dispatchEvent
Open
$this->dispatchEvent(NodeEvents::NODE_DELETE_VERSION, new NodeEvent($node));
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but updateChildrenOrderAction()
is declared to return \Symfony\Component\HttpFoundation\Response
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$repository = $this->get('open_orchestra_model.repository.node');
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but deleteNodeVersionsAction()
is declared to return \Symfony\Component\HttpFoundation\Response
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
Return type of listUsageBlockAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
public function listUsageBlockAction(Request $request, $siteId, $language, $blockId)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$repository = $this->get('open_orchestra_model.repository.node');
- Create a ticketCreate a ticket
- Exclude checks
Parameter $area
has undeclared type \OpenOrchestra\ModelInterface\Model\AreaInterface
Open
protected function copyTranslatedBlocks(NodeInterface $node, AreaInterface $area, $language, $areaId)
- Create a ticketCreate a ticket
- Exclude checks
Call to method getBlocks
from undeclared class \OpenOrchestra\ModelInterface\Model\AreaInterface
Open
$blocks = $area->getBlocks();
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\BlockEvent
Open
$this->dispatchEvent(BlockEvents::POST_BLOCK_CREATE, new BlockEvent($blockToTranslate));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$siteId = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getSiteId();
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$this->get('open_orchestra_backoffice.manager.node')->reorderNodes($orderedNodes, $node);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant POST_BLOCK_CREATE
from undeclared class \OpenOrchestra\ModelInterface\BlockEvents
Open
$this->dispatchEvent(BlockEvents::POST_BLOCK_CREATE, new BlockEvent($blockToTranslate));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::dispatchEvent
Open
$this->dispatchEvent(BlockEvents::POST_BLOCK_CREATE, new BlockEvent($blockToTranslate));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::get
Open
$node = $this->get('open_orchestra_model.repository.node')->findOneByNodeAndSite($nodeId, $siteId);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\NodeController::getParameter
Open
$this->getParameter('open_orchestra_api.facade.node_collection.class'),
- Create a ticketCreate a ticket
- Exclude checks
Parameter $node
has undeclared type \OpenOrchestra\ModelInterface\Model\NodeInterface
Open
protected function copyTranslatedBlocks(NodeInterface $node, AreaInterface $area, $language, $areaId)
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\BlockNodeEvent
Open
$this->dispatchEvent(BlockNodeEvents::ADD_BLOCK_TO_NODE, new BlockNodeEvent($node, $blockToTranslate));
- Create a ticketCreate a ticket
- Exclude checks
Avoid excessively long variable names like $saveOldPublishedVersion. Keep variable name length under 20. Open
public function changeStatusAction(Request $request, $saveOldPublishedVersion)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
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
Line exceeds 120 characters; contains 122 characters Open
$this->get('open_orchestra_api.transformer_manager')->reverseTransform('node', $facade, array('source' => $node));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 133 characters Open
$blockToTranslate = $this->get('open_orchestra_backoffice.manager.block')->createToTranslateBlock($block, $language);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 151 characters Open
* @Config\Route("/list/not-published-by-author", name="open_orchestra_api_node_list_author_and_site_not_published", defaults={"published": false})
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 132 characters Open
return $this->get('open_orchestra_model.repository.node')->findVersionNotDeleted($nodeId, $language, $siteId, $version);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 138 characters Open
$this->get('open_orchestra_model.repository.node')->removeBlockInArea($blockId, $areaName, $nodeId, $siteId, $language, $version);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::EDIT, $node)) {
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 125 characters Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(NodeStrategy::CHANGE_STATUS, $node)) {
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 126 characters Open
$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(NodeStrategy::DELETE_VERSION, $node)
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::EDIT, $node)) {
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::EDIT, $node)) {
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 128 characters Open
$nodes = $this->get('open_orchestra_model.repository.node')->findNotDeletedSortByUpdatedAt($nodeId, $language, $siteId);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
if ($this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::DELETE, $block)) {
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 129 characters Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::DELETE, $node)) {
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 122 characters Open
* @Config\Route("/list/by-author", name="open_orchestra_api_node_list_author_and_site", defaults={"published": null})
- Create a ticketCreate a ticket
- Exclude checks
Expected 1 space after IF keyword; 0 found Open
if(empty($nodes)) {
- Create a ticketCreate a ticket
- Exclude checks