ApiBundle/Controller/BlockController.php
Missing class import via use statement (line '150', column '23'). Open
Open
throw new \UnexpectedValueException();
- 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
Missing class import via use statement (line '96', column '23'). Open
Open
throw new \UnexpectedValueException();
- 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
Avoid using static access to class '\OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration' in method 'listSharedBlockTableAction'. Open
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
Possibly zero references to use statement for classlike/namespace ContributionRoleInterface
(\OpenOrchestra\Backoffice\Security\ContributionRoleInterface)
Open
Open
use OpenOrchestra\Backoffice\Security\ContributionRoleInterface;
- Create a ticketCreate a ticket
- Exclude checks
Possibly zero references to use statement for classlike/namespace Config
(\Sensio\Bundle\FrameworkExtraBundle\Configuration)
Open
Open
use Sensio\Bundle\FrameworkExtraBundle\Configuration as Config;
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
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\BlockController::get
Open
Open
$site = $this->get('open_orchestra_model.repository.site')->findOneBySiteId($siteId);
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
if (!$block instanceof BlockInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
return $this->get('open_orchestra_api.transformer_manager')->transform('block', $block);
- Create a ticketCreate a ticket
- Exclude checks
Return type of listSharedBlockTableAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
public function listSharedBlockTableAction(Request $request, $language)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
return $this->get('open_orchestra_api.transformer_manager')->transform('block_component_collection', $availableBlocks);
- Create a ticketCreate a ticket
- Exclude checks
Return type of deleteBlockAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
Open
public function deleteBlockAction($blockId)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::createAccessDeniedException
Open
Open
$this->createAccessDeniedException();
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ENTITY_TYPE
from undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::CREATE, BlockInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
$repository = $this->get('open_orchestra_model.repository.block');
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ENTITY_TYPE
from undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::READ, BlockInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::dispatchEvent
Open
Open
$this->dispatchEvent(BlockEvents::POST_BLOCK_DELETE, new BlockEvent($block));
- Create a ticketCreate a ticket
- Exclude checks
Call to method generateFromRequest
from undeclared class \OpenOrchestra\Pagination\Configuration\PaginateFinderConfiguration
Open
Open
$configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
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\BlockController::denyAccessUnlessGranted
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::READ, BlockInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
$facade = $this->get('open_orchestra_api.transformer_manager')->transform('block_collection', $collection);
- Create a ticketCreate a ticket
- Exclude checks
Returning type array{}
but deleteBlockAction()
is declared to return \Symfony\Component\HttpFoundation\Response
Open
Open
return array();
- Create a ticketCreate a ticket
- Exclude checks
Return type of listSharedBlockByComponentAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
public function listSharedBlockByComponentAction($language, $component)
- Create a ticketCreate a ticket
- Exclude checks
Call to method setTransverse
from undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
$block->setTransverse(true);
- Create a ticketCreate a ticket
- Exclude checks
Possibly zero references to use statement for classlike/namespace Api
(\OpenOrchestra\BaseApiBundle\Controller\Annotation)
Open
Open
use OpenOrchestra\BaseApiBundle\Controller\Annotation as Api;
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::denyAccessUnlessGranted
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::READ, BlockInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\BlockEvent
Open
Open
$this->dispatchEvent(BlockEvents::POST_BLOCK_DELETE, new BlockEvent($block));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
$block = $this->get('open_orchestra_model.repository.block')->findById($blockId);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ENTITY_TYPE
from undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::READ, BlockInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::denyAccessUnlessGranted
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::CREATE, BlockInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant ENTITY_TYPE
from undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::READ, BlockInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
if (!$this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::DELETE, $block)) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
return $this->get('open_orchestra_api.transformer_manager')->transform('block_collection', $collection);
- Create a ticketCreate a ticket
- Exclude checks
Return type of shareBlockAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
public function shareBlockAction($blockId)
- Create a ticketCreate a ticket
- Exclude checks
Return type of listAvailableBlockComponentAction()
is undeclared type \OpenOrchestra\BaseApi\Facade\FacadeInterface
Open
Open
public function listAvailableBlockComponentAction()
- Create a ticketCreate a ticket
- Exclude checks
Checking instanceof against undeclared class \OpenOrchestra\ModelInterface\Model\BlockInterface
Open
Open
if (!$block instanceof BlockInterface) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
$components = $this->get('open_orchestra_backoffice.manager.block_configuration')->getComponentsWithCategory($configuration->getSearchIndex('category'));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
$repository = $this->get('open_orchestra_model.repository.block');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
$repository = $this->get('open_orchestra_model.repository.block');
- Create a ticketCreate a ticket
- Exclude checks
@throws type of shareBlockAction
has undeclared type \OpenOrchestra\BaseApi\Exceptions\HttpException\ClientAccessDeniedHttpException
Open
Open
public function shareBlockAction($blockId)
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
Open
public function listSharedBlockTableAction(Request $request, $language)
- Create a ticketCreate a ticket
- Exclude checks
Class extends undeclared class \OpenOrchestra\BaseApiBundle\Controller\BaseController
Open
Open
class BlockController extends BaseController
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::denyAccessUnlessGranted
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::DELETE, $block);
- Create a ticketCreate a ticket
- Exclude checks
@throws type of shareBlockAction
has undeclared type \OpenOrchestra\ApiBundle\Controller\UnexpectedValueException
(Did you mean class \UnexpectedValueException) Open
Open
public function shareBlockAction($blockId)
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant POST_BLOCK_DELETE
from undeclared class \OpenOrchestra\ModelInterface\BlockEvents
Open
Open
$this->dispatchEvent(BlockEvents::POST_BLOCK_DELETE, new BlockEvent($block));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
$objectManager = $this->get('object_manager');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::denyAccessUnlessGranted
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::READ, BlockInterface::ENTITY_TYPE);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
$objectManager = $this->get('object_manager');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\ApiBundle\Controller\BlockController::get
Open
Open
$siteId = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getSiteId();
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 127 characters Open
Open
return $this->get('open_orchestra_api.transformer_manager')->transform('block_component_collection', $availableBlocks);
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 130 characters Open
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 165 characters Open
Open
$components = $this->get('open_orchestra_backoffice.manager.block_configuration')->getComponentsWithCategory($configuration->getSearchIndex('category'));
- Create a ticketCreate a ticket
- Exclude checks