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,8 +1,14 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\DocGeneratorBundle\Entity;
use Chill\DocGeneratorBundle\Repository\DocGeneratorTemplateRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
@@ -12,6 +18,36 @@ use Symfony\Component\Serializer\Annotation as Serializer;
*/
class DocGeneratorTemplate
{
/**
* @ORM\Column(type="string", length=255)
*
* Class name of the context to use
*
* so if $context = ''
* this template will use '' as context
*/
private string $context;
/**
* @ORM\Column(type="text", nullable=true)
*/
private string $description;
/**
* @ORM\Column(type="simple_array")
*
* Class name of the entities for which this template can be used
*
* so if $entities = ['Chill\PersonBundle\Entity\AccompanyingPeriod', 'Chill\PersonBundle\Entity\SocialWork\SocialAction']
* this template can be selected for an AccompanyingPeriod or a SocialAction
*/
private array $entities = [];
/**
* @ORM\Column(type="string", length=255)
*/
private string $file;
/**
* @ORM\Id
* @ORM\GeneratedValue
@@ -26,37 +62,25 @@ class DocGeneratorTemplate
*/
private array $name = [];
/**
* @ORM\Column(type="text", nullable=true)
*/
private string $description;
public function getContext(): ?string
{
return $this->context;
}
public function getDescription(): ?string
{
return $this->description;
}
/**
* @ORM\Column(type="simple_array")
*
* Class name of the entities for which this template can be used
*
* so if $entities = ['Chill\PersonBundle\Entity\AccompanyingPeriod', 'Chill\PersonBundle\Entity\SocialWork\SocialAction']
* this template can be selected for an AccompanyingPeriod or a SocialAction
*/
private array $entities = [];
public function getEntities(): ?array
{
return $this->entities;
}
/**
* @ORM\Column(type="string", length=255)
*
* Class name of the context to use
*
* so if $context = ''
* this template will use '' as context
*/
private string $context;
/**
* @ORM\Column(type="string", length=255)
*/
private string $file;
public function getFile(): ?string
{
return $this->file;
}
public function getId(): ?int
{
@@ -68,18 +92,13 @@ class DocGeneratorTemplate
return $this->name;
}
public function setName(array $name): self
public function setContext(string $context): self
{
$this->name = $name;
$this->context = $context;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
@@ -87,9 +106,11 @@ class DocGeneratorTemplate
return $this;
}
public function getFile(): ?string
public function setEntities(array $entities): self
{
return $this->file;
$this->entities = $entities;
return $this;
}
public function setFile(string $file): self
@@ -99,26 +120,9 @@ class DocGeneratorTemplate
return $this;
}
public function getEntities(): ?array
public function setName(array $name): self
{
return $this->entities;
}
public function setEntities(array $entities): self
{
$this->entities = $entities;
return $this;
}
public function getContext(): ?string
{
return $this->context;
}
public function setContext(string $context): self
{
$this->context = $context;
$this->name = $name;
return $this;
}