BackofficeBundle/Controller/ContentTypeController.php
Method newAction
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newAction(Request $request)
{
/** @var ContentTypeInterface $contentType */
$contentType = $this->get('open_orchestra_backoffice.manager.content_type')->initializeNewContentType();
- Create a ticketCreate a ticket
Argument 1 (form)
is \Symfony\Component\Form\Form
but \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::renderAdminForm()
takes \Symfony\Component\Form\FormInterface
defined at /code/BackofficeBundle/Controller/AbstractAdminController.php:58
Open
Open
return $this->renderAdminForm($form);
- Create a ticketCreate a ticket
- Exclude checks
Argument 1 (form)
is \Symfony\Component\Form\Form
but \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::renderAdminForm()
takes \Symfony\Component\Form\FormInterface
defined at /code/BackofficeBundle/Controller/AbstractAdminController.php:58
Open
Open
return $this->renderAdminForm($form);
- Create a ticketCreate a ticket
- Exclude checks
Argument 2 (event)
is \OpenOrchestra\ModelInterface\Event\ContentTypeEvent
but \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::dispatchEvent()
takes \Symfony\Component\EventDispatcher\Event
defined at /code/BackofficeBundle/Controller/AbstractAdminController.php:81
Open
Open
$this->dispatchEvent(ContentTypeEvents::CONTENT_TYPE_UPDATE, new ContentTypeEvent($newContentType));
- Create a ticketCreate a ticket
- Exclude checks
Call to method handleRequest
from undeclared class \Symfony\Component\Form\Form
Open
Open
$form->handleRequest($request);
- Create a ticketCreate a ticket
- Exclude checks
Call to method getMethod
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
Open
if ('PATCH' !== $request->getMethod()) {
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
Open
public function formAction(Request $request, $contentTypeId)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::generateUrl
Open
Open
$action = $this->generateUrl('open_orchestra_backoffice_content_type_form', array('contentTypeId' => $contentTypeId));
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant CONTENT_TYPE_UPDATE
from undeclared class \OpenOrchestra\ModelInterface\ContentTypeEvents
Open
Open
$this->dispatchEvent(ContentTypeEvents::CONTENT_TYPE_UPDATE, new ContentTypeEvent($newContentType));
- Create a ticketCreate a ticket
- Exclude checks
Argument 2 (data)
is \OpenOrchestra\ModelInterface\Model\ContentTypeInterface
but \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::createForm()
takes null
defined at /code/BackofficeBundle/Controller/AbstractAdminController.php:94
Open
Open
return $this->createForm('oo_content_type', $contentType, $option);
- Create a ticketCreate a ticket
- Exclude checks
Argument 2 (option)
is array{action:mixed,enable_delete_button:mixed,delete_button:mixed,need_link_to_site_defintion:false}
but \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::createContentTypeForm()
takes string
defined at /code/BackofficeBundle/Controller/ContentTypeController.php:108
Open
Open
'action' => $action,
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::generateUrl
Open
Open
$action = $this->generateUrl('open_orchestra_backoffice_content_type_new', array());
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::denyAccessUnlessGranted
Open
Open
$this->denyAccessUnlessGranted(ContributionActionInterface::EDIT, $contentType);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::get
Open
Open
$message = $this->get('translator')->trans('open_orchestra_backoffice.form.content_type.creation');
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant CONTENT_TYPE_CREATE
from undeclared class \OpenOrchestra\ModelInterface\ContentTypeEvents
Open
Open
$this->dispatchEvent(ContentTypeEvents::CONTENT_TYPE_CREATE, new ContentTypeEvent($contentType));
- Create a ticketCreate a ticket
- Exclude checks
Reference to constant HTTP_CREATED
from undeclared class \Symfony\Component\HttpFoundation\Response
Open
Open
Response::HTTP_CREATED,
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::get
Open
Open
$newContentType = $this->get('open_orchestra_backoffice.manager.content_type')->duplicate($contentType);
- Create a ticketCreate a ticket
- Exclude checks
Call to method handleRequest
from undeclared class \Symfony\Component\Form\Form
Open
Open
$form->handleRequest($request);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::get
Open
Open
$language = $this->get('open_orchestra_backoffice.context_backoffice_manager')->getBackOfficeLanguage();
- Create a ticketCreate a ticket
- Exclude checks
Return type of createContentTypeForm()
is undeclared type \Symfony\Component\Form\Form
Open
Open
protected function createContentTypeForm(Request $request, $option, ContentTypeInterface $contentType)
- Create a ticketCreate a ticket
- Exclude checks
Argument 2 (option)
is array{action:mixed,new_button:true,need_link_to_site_defintion:true}
but \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::createContentTypeForm()
takes string
defined at /code/BackofficeBundle/Controller/ContentTypeController.php:108
Open
Open
'action' => $action,
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\ContentTypeEvent
Open
Open
$this->dispatchEvent(ContentTypeEvents::CONTENT_TYPE_CREATE, new ContentTypeEvent($contentType));
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \Symfony\Component\HttpFoundation\Response
Open
Open
$response = new Response(
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::isGranted
Open
Open
'delete_button' => $this->isGranted(ContributionActionInterface::DELETE, $newContentType),
- Create a ticketCreate a ticket
- Exclude checks
Call to method isValid
from undeclared class \Symfony\Component\Form\Form
Open
Open
if ($form->isValid()) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method isValid
from undeclared class \Symfony\Component\Form\Form
Open
Open
if ($form->isValid()) {
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
Open
protected function createContentTypeForm(Request $request, $option, ContentTypeInterface $contentType)
- Create a ticketCreate a ticket
- Exclude checks
Call to method __construct
from undeclared class \OpenOrchestra\ModelInterface\Event\ContentTypeEvent
Open
Open
$this->dispatchEvent(ContentTypeEvents::CONTENT_TYPE_UPDATE, new ContentTypeEvent($newContentType));
- Create a ticketCreate a ticket
- Exclude checks
Parameter $request
has undeclared type \Symfony\Component\HttpFoundation\Request
Open
Open
public function newAction(Request $request)
- Create a ticketCreate a ticket
- Exclude checks
Return type of newAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
Open
public function newAction(Request $request)
- Create a ticketCreate a ticket
- Exclude checks
When appending to a value of type string,
found an array access index of type 'validation_groups',
but expected the index to be of type int
Open
Open
$option["validation_groups"] = false;
- Create a ticketCreate a ticket
- Exclude checks
Argument 2 (event)
is \OpenOrchestra\ModelInterface\Event\ContentTypeEvent
but \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::dispatchEvent()
takes \Symfony\Component\EventDispatcher\Event
defined at /code/BackofficeBundle/Controller/AbstractAdminController.php:81
Open
Open
$this->dispatchEvent(ContentTypeEvents::CONTENT_TYPE_CREATE, new ContentTypeEvent($contentType));
- Create a ticketCreate a ticket
- Exclude checks
Parameter $contentType
has undeclared type \OpenOrchestra\ModelInterface\Model\ContentTypeInterface
Open
Open
protected function createContentTypeForm(Request $request, $option, ContentTypeInterface $contentType)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::get
Open
Open
$documentManager = $this->get('object_manager');
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::get
Open
Open
$this->get('session')->getFlashBag()->add('success', $this->get('translator')->trans('open_orchestra_backoffice.form.content_type.success'));
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::get
Open
Open
$documentManager = $this->get('object_manager');
- 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
Return type of formAction()
is undeclared type \Symfony\Component\HttpFoundation\Response
Open
Open
public function formAction(Request $request, $contentTypeId)
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::get
Open
Open
$contentType = $this->get('open_orchestra_model.repository.content_type')->findOneByContentTypeIdInLastVersion($contentTypeId);
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::get
Open
Open
'enable_delete_button' => $this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::DELETE, $contentType),
- Create a ticketCreate a ticket
- Exclude checks
Call to method getMethod
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
Open
if ("PATCH" === $request->getMethod()) {
- Create a ticketCreate a ticket
- Exclude checks
Call to method getMethod
from undeclared class \Symfony\Component\HttpFoundation\Request
Open
Open
if ('PATCH' !== $request->getMethod()) {
- Create a ticketCreate a ticket
- Exclude checks
Call to undeclared method \OpenOrchestra\BackofficeBundle\Controller\ContentTypeController::get
Open
Open
$contentType = $this->get('open_orchestra_backoffice.manager.content_type')->initializeNewContentType();
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 157 characters Open
Open
$this->get('session')->getFlashBag()->add('success', $this->get('translator')->trans('open_orchestra_backoffice.form.content_type.success'));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 126 characters Open
Open
$action = $this->generateUrl('open_orchestra_backoffice_content_type_form', array('contentTypeId' => $contentTypeId));
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 159 characters Open
Open
'enable_delete_button' => $this->get('open_orchestra_backoffice.business_rules_manager')->isGranted(BusinessActionInterface::DELETE, $contentType),
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 169 characters Open
Open
array('Content-type' => 'text/plain; charset=utf-8', 'contentTypeId' => $contentType->getContentTypeId(), 'name' => $contentType->getName($language))
- Create a ticketCreate a ticket
- Exclude checks
Line exceeds 120 characters; contains 135 characters Open
Open
$contentType = $this->get('open_orchestra_model.repository.content_type')->findOneByContentTypeIdInLastVersion($contentTypeId);
- Create a ticketCreate a ticket
- Exclude checks