cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,81 +1,60 @@
<?php
/*
*
*/
namespace Chill\TaskBundle\Event\UI;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\HttpFoundation\Response;
use Chill\TaskBundle\Entity\AbstractTask;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Workflow\Transition;
/**
*
* Chill is a software for social workers
*
* @author Julien Fastré <julien.fastre@champs-libres.coop>
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\TaskBundle\Event\UI;
use Chill\TaskBundle\Entity\AbstractTask;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Workflow\Transition;
class UIEvent extends Event
{
const SHOW_TRANSITION_PAGE = 'chill_task.show_transition_page';
const EDIT_FORM = 'chill_task.edit_form';
const EDIT_PAGE = 'chill_task.edit_page';
public const EDIT_FORM = 'chill_task.edit_form';
public const EDIT_PAGE = 'chill_task.edit_page';
public const SHOW_TRANSITION_PAGE = 'chill_task.show_transition_page';
/**
* @var FormInterface|null
*/
protected $form;
/**
*
* @var string
*/
protected $kind;
/**
*
* @var AbstractTask
*/
protected $task;
/**
*
* @var Response|null
*/
protected $response = null;
protected $response;
/**
*
* @var FormInterface|null
* @var AbstractTask
*/
protected $form = null;
protected $task;
/**
* @var Transition
*/
protected $transition = null;
protected $transition;
public function __construct($kind, AbstractTask $task)
{
$this->kind = $kind;
$this->task = $task;
}
/**
*
* @return string
*/
public function getKind()
{
return $this->kind;
}
/**
*
* @return AbstractTask
*/
public function getTask(): AbstractTask
{
return $this->task;
}
/**
*
* @return FormInterface|null
*/
public function getForm()
@@ -83,15 +62,25 @@ class UIEvent extends Event
return $this->form;
}
public function setForm(FormInterface $form)
{
$this->form = $form;
return $this;
}
/**
*
* @return string
*/
public function getKind()
{
return $this->kind;
}
public function getResponse(): Response
{
return $this->response;
}
public function getTask(): AbstractTask
{
return $this->task;
}
/**
* @return Transition
*/
public function getTransition()
@@ -99,38 +88,32 @@ class UIEvent extends Event
return $this->transition;
}
public function setTransition(Transition $transition)
{
$this->transition = $transition;
return $this;
}
/**
*
* @return Response
*/
public function getResponse(): Response
{
return $this->response;
}
/**
*
* @param Response $response
* @return $this
*/
public function setResponse(Response $response)
{
$this->response = $response;
return $this;
}
public function hasResponse()
{
return $this->response instanceof Response;
}
public function setForm(FormInterface $form)
{
$this->form = $form;
return $this;
}
/**
* @return $this
*/
public function setResponse(Response $response)
{
$this->response = $response;
return $this;
}
public function setTransition(Transition $transition)
{
$this->transition = $transition;
return $this;
}
}