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,77 +1,33 @@
<?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\ReportBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Chill\MainBundle\Entity\User;
use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup;
use Chill\MainBundle\Entity\Center;
use Chill\PersonBundle\Entity\Person;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\HasCenterInterface;
use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\CustomFieldsBundle\Entity\CustomFieldsGroup;
use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\Entity\Person;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Report
* Class Report.
*
* @package Chill\ReportBundle\Entity
* @ORM\Entity()
* @ORM\Entity
* @ORM\Table(name="report")
* @ORM\HasLifecycleCallbacks()
* @ORM\HasLifecycleCallbacks
*/
class Report implements HasCenterInterface, HasScopeInterface
{
/**
* @var integer
*
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var User
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
*/
private $user;
/**
* @var Person
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/
private $person;
/**
* @var \DateTime
* @ORM\Column(type="datetime")
*/
private $date;
/**
* @var Scope
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
*/
private $scope;
/**
* @var array
* @ORM\Column(type="json")
@@ -81,15 +37,85 @@ class Report implements HasCenterInterface, HasScopeInterface
/**
* @var CustomFieldsGroup
* @ORM\ManyToOne(
* targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup")
* targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup")
*/
private $cFGroup;
/**
* @var DateTime
* @ORM\Column(type="datetime")
*/
private $date;
/**
* Get id
* @var int
*
* @return integer
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var Person
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person")
*/
private $person;
/**
* @var Scope
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope")
*/
private $scope;
/**
* @var User
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
*/
private $user;
/**
* @return Center
*/
public function getCenter()
{
return $this->person->getCenter();
}
/**
* Get cFData.
*
* @return array
*/
public function getCFData()
{
return $this->cFData;
}
/**
* Get cFGroup.
*
* @return CustomFieldsGroup
*/
public function getCFGroup()
{
return $this->cFGroup;
}
/**
* Get date.
*
* @return DateTime
*/
public function getDate()
{
return $this->date;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
@@ -97,43 +123,7 @@ class Report implements HasCenterInterface, HasScopeInterface
}
/**
* Set user
*
* @param User $user
* @return Report
*/
public function setUser(User $user)
{
$this->user = $user;
return $this;
}
/**
* Get user
*
* @return User
*/
public function getUser()
{
return $this->user;
}
/**
* Set person
*
* @param Person $person
* @return Report
*/
public function setPerson(Person $person)
{
$this->person = $person;
return $this;
}
/**
* Get person
* Get person.
*
* @return Person
*/
@@ -143,43 +133,7 @@ class Report implements HasCenterInterface, HasScopeInterface
}
/**
* Set date
*
* @param \DateTime $date
* @return Report
*/
public function setDate($date)
{
$this->date = $date;
return $this;
}
/**
* Get date
*
* @return \DateTime
*/
public function getDate()
{
return $this->date;
}
/**
* Set scope
*
* @param string $scope
* @return Report
*/
public function setScope(Scope $scope)
{
$this->scope = $scope;
return $this;
}
/**
* Get scope
* Get scope.
*
* @return Scope
*/
@@ -189,9 +143,18 @@ class Report implements HasCenterInterface, HasScopeInterface
}
/**
* Set cFData
* Get user.
*
* @return User
*/
public function getUser()
{
return $this->user;
}
/**
* Set cFData.
*
* @param array $cFData
* @return Report
*/
public function setCFData(array $cFData)
@@ -202,19 +165,8 @@ class Report implements HasCenterInterface, HasScopeInterface
}
/**
* Get cFData
* Set cFGroup.
*
* @return array
*/
public function getCFData()
{
return $this->cFData;
}
/**
* Set cFGroup
*
* @param CustomFieldsGroup $cFGroup
* @return Report
*/
public function setCFGroup(CustomFieldsGroup $cFGroup)
@@ -225,21 +177,54 @@ class Report implements HasCenterInterface, HasScopeInterface
}
/**
* Get cFGroup
* Set date.
*
* @return CustomFieldsGroup
* @param DateTime $date
*
* @return Report
*/
public function getCFGroup()
public function setDate($date)
{
return $this->cFGroup;
$this->date = $date;
return $this;
}
/**
* @return Center
* Set person.
*
* @return Report
*/
public function getCenter()
public function setPerson(Person $person)
{
return $this->person->getCenter();
$this->person = $person;
return $this;
}
/**
* Set scope.
*
* @param string $scope
*
* @return Report
*/
public function setScope(Scope $scope)
{
$this->scope = $scope;
return $this;
}
/**
* Set user.
*
* @return Report
*/
public function setUser(User $user)
{
$this->user = $user;
return $this;
}
}