apply rector rules

This commit is contained in:
2023-07-28 02:40:02 +02:00
parent 157cdf6dfc
commit f570fe92a5
112 changed files with 252 additions and 562 deletions

View File

@@ -35,35 +35,31 @@ use function array_keys;
abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
{
/**
* @var User
* @ORM\ManyToOne(
* targetEntity="\Chill\MainBundle\Entity\User"
* )
* @Serializer\Groups({"read"})
*/
private $assignee;
private ?\Chill\MainBundle\Entity\User $assignee = null;
/**
* @var Scope
* @ORM\ManyToOne(
* targetEntity="\Chill\MainBundle\Entity\Scope"
* )
*/
private $circle;
private ?\Chill\MainBundle\Entity\Scope $circle = null;
/**
* @var bool
* @ORM\Column(name="closed", type="boolean", options={ "default": false })
* @Serializer\Groups({"read"})
*/
private $closed = false;
private bool $closed = false;
/**
* @var AccompanyingPeriod
* @ORM\ManyToOne(targetEntity="\Chill\PersonBundle\Entity\AccompanyingPeriod")
* @Serializer\Groups({"read"})
*/
private $course;
private ?\Chill\PersonBundle\Entity\AccompanyingPeriod $course = null;
/**
* @var json
@@ -74,38 +70,34 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
private $currentStates = [];
/**
* @var string
*
* @ORM\Column(name="description", type="text")
* @Serializer\Groups({"read"})
*/
private $description = '';
private string $description = '';
/**
* @var Person
* @ORM\ManyToOne(
* targetEntity="\Chill\PersonBundle\Entity\Person"
* )
* @Serializer\Groups({"read"})
*/
private $person;
private ?\Chill\PersonBundle\Entity\Person $person = null;
/**
* @var string
*
* @ORM\Column(name="title", type="text")
* @Assert\NotBlank
* @Serializer\Groups({"read"})
*/
private $title = '';
private string $title = '';
/**
* @var string
*
* @ORM\Column(name="type", type="string", length=255)
* @Serializer\Groups({"read"})
*/
private $type;
private ?string $type = null;
public function getAssignee(): ?User
{

View File

@@ -74,7 +74,7 @@ class RecurringTask extends AbstractTask
* mappedBy="recurringTask"
* )
*/
private $singleTasks;
private Collection $singleTasks;
public function __construct()
{

View File

@@ -65,13 +65,12 @@ class SingleTask extends AbstractTask
private $id;
/**
* @var RecurringTask
* @ORM\ManyToOne(
* targetEntity="RecurringTask",
* inversedBy="singleTasks"
* )
*/
private $recurringTask;
private ?\Chill\TaskBundle\Entity\RecurringTask $recurringTask = null;
/**
* @var DateTime

View File

@@ -23,19 +23,16 @@ use Doctrine\ORM\Mapping as ORM;
class AbstractTaskPlaceEvent
{
/**
* @var User
* @ORM\ManyToOne(
* targetEntity="\Chill\MainBundle\Entity\User"
* )
*/
private $author;
private ?\Chill\MainBundle\Entity\User $author = null;
/**
* @var string
*
* @ORM\Column(name="data", type="json")
*/
private $data = [];
private array $data = [];
/**
* @var datetime_immutable
@@ -54,11 +51,9 @@ class AbstractTaskPlaceEvent
private $id;
/**
* @var string
*
* @ORM\Column(name="transition", type="string", length=255)
*/
private $transition = '';
private string $transition = '';
public function __construct()
{
@@ -72,10 +67,8 @@ class AbstractTaskPlaceEvent
/**
* Get data.
*
* @return string
*/
public function getData()
public function getData(): array
{
return $this->data;
}
@@ -120,11 +113,9 @@ class AbstractTaskPlaceEvent
/**
* Set data.
*
* @param string $data
*
* @return AbstractTaskPlaceEvent
*/
public function setData($data)
public function setData(array $data)
{
$this->data = $data;