Testing to see what still works, minor changes

This commit is contained in:
2022-02-23 14:53:37 +01:00
parent 5a514cf2db
commit 67ae506bb5
7 changed files with 53 additions and 71 deletions

View File

@@ -11,6 +11,7 @@ declare(strict_types=1);
namespace Chill\BudgetBundle\Entity;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\HasCenterInterface;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
@@ -58,7 +59,7 @@ class Charge extends AbstractElement implements HasCenterInterface
$this->setStartDate(new DateTimeImmutable('today'));
}
public function getCenter(): \Chill\MainBundle\Entity\Center
public function getCenter(): ?Center
{
return $this->getPerson()->getCenter();
}

View File

@@ -11,6 +11,7 @@ declare(strict_types=1);
namespace Chill\BudgetBundle\Entity;
use Chill\MainBundle\Entity\Center;
use Chill\MainBundle\Entity\HasCenterInterface;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
@@ -37,7 +38,7 @@ class Resource extends AbstractElement implements HasCenterInterface
$this->setStartDate(new DateTimeImmutable('today'));
}
public function getCenter(): \Chill\MainBundle\Entity\Center
public function getCenter(): ?Center
{
return $this->getPerson()->getCenter();
}