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,9 +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\DocStoreBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
@@ -13,25 +18,27 @@ use Doctrine\ORM\Mapping as ORM;
class DocumentCategory
{
/**
* @ORM\Id()
* @ORM\Id
* @ORM\Column(type="string", name="bundle_id")
*
* @var string The id of the bundle that has create the category (i.e. 'person', 'activity', ....)
*/
private $bundleId;
/**
* @ORM\Id()
* @ORM\Column(type="integer", name="id_inside_bundle")
* @var int The id which is unique inside the bundle
*/
private $idInsideBundle;
/**
* @ORM\Column(type="string", name="document_class")
*
* @var string The class of the document (ie Chill\DocStoreBundle\PersonDocument)
*/
private $documentClass;
/**
* @ORM\Id
* @ORM\Column(type="integer", name="id_inside_bundle")
*
* @var int The id which is unique inside the bundle
*/
private $idInsideBundle;
/**
* @ORM\Column(type="json")
@@ -44,19 +51,38 @@ class DocumentCategory
$this->idInsideBundle = $idInsideBundle;
}
public function getBundleId() // ::class BundleClass (FQDN)
public function getBundleId() // ::class BundleClass (FQDN)
{
return $this->bundleId;
}
public function getDocumentClass()
{
return $this->documentClass;
}
public function getIdInsideBundle()
{
return $this->idInsideBundle;
}
public function getDocumentClass()
public function getName($locale = null)
{
return $this->documentClass;
if ($locale) {
if (isset($this->name[$locale])) {
return $this->name[$locale];
}
foreach ($this->name as $name) {
if (!empty($name)) {
return $name;
}
}
return '';
}
return $this->name;
}
public function setDocumentClass($documentClass): self
@@ -66,24 +92,6 @@ class DocumentCategory
return $this;
}
public function getName($locale = null)
{
if ($locale) {
if (isset($this->name[$locale])) {
return $this->name[$locale];
} else {
foreach ($this->name as $name) {
if (!empty($name)) {
return $name;
}
}
}
return '';
} else {
return $this->name;
}
}
public function setName($name): self
{
$this->name = $name;