mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 01:53:49 +00:00
refactor: Update source code based on PHP conventions.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user