refactor: Update source code based on PHP conventions.

This commit is contained in:
Pol Dellaiera
2021-04-26 15:45:05 +02:00
parent 6b2eda0f94
commit 054a28ecf4
766 changed files with 52425 additions and 53000 deletions

View File

@@ -1,12 +1,24 @@
<?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.
*
* @see https://www.champs-libres.coop/
*/
declare(strict_types=1);
namespace Chill\AMLI\BudgetBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Chill\MainBundle\Entity\HasCenterInterface;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
/**
* Resource
* Resource.
*
* @ORM\Table(name="chill_budget.resource")
* @ORM\Entity(repositoryClass="Chill\AMLI\BudgetBundle\Repository\ResourceRepository")
@@ -21,13 +33,17 @@ class Resource extends AbstractElement implements HasCenterInterface
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
public function __construct()
{
$this->setStartDate(new \DateTimeImmutable('today'));
$this->setStartDate(new DateTimeImmutable('today'));
}
public function getCenter(): \Chill\MainBundle\Entity\Center
{
return $this->getPerson()->getCenter();
}
/**
* Get id.
*
@@ -38,11 +54,6 @@ class Resource extends AbstractElement implements HasCenterInterface
return $this->id;
}
public function getCenter(): \Chill\MainBundle\Entity\Center
{
return $this->getPerson()->getCenter();
}
public function isCharge(): bool
{
return false;