mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,28 +1,17 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
@@ -31,24 +20,6 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
*/
|
||||
class Center implements HasCenterInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Id
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=255)
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
private string $name = '';
|
||||
|
||||
/**
|
||||
* @var Collection
|
||||
*
|
||||
@@ -59,6 +30,20 @@ class Center implements HasCenterInterface
|
||||
*/
|
||||
private $groupCenters;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Id
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
* @Serializer\Groups({"docgen:read"})
|
||||
*/
|
||||
private string $name = '';
|
||||
|
||||
/**
|
||||
* Center constructor.
|
||||
@@ -71,27 +56,27 @@ class Center implements HasCenterInterface
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function __toString()
|
||||
{
|
||||
return $this->name;
|
||||
return $this->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @return $this
|
||||
*/
|
||||
public function setName($name)
|
||||
public function addGroupCenter(GroupCenter $groupCenter)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->groupCenters->add($groupCenter);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @return $this|Center
|
||||
*/
|
||||
public function getId()
|
||||
public function getCenter()
|
||||
{
|
||||
return $this->id;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,29 +88,30 @@ class Center implements HasCenterInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param GroupCenter $groupCenter
|
||||
* @return $this
|
||||
* @return int
|
||||
*/
|
||||
public function addGroupCenter(GroupCenter $groupCenter)
|
||||
public function getId()
|
||||
{
|
||||
$this->groupCenters->add($groupCenter);
|
||||
return $this;
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
public function getName()
|
||||
{
|
||||
return $this->getName();
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this|Center
|
||||
* @param $name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function getCenter()
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user