fix cs and add EntityToIdTransformer

This commit is contained in:
2022-05-20 15:52:02 +02:00
parent dba0e84781
commit b6e0379583
14 changed files with 308 additions and 97 deletions

View File

@@ -18,6 +18,7 @@ use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Chill\MainBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use LogicException;
/**
* @ORM\Table(name="chill_calendar.invite")
@@ -98,7 +99,7 @@ class Invite implements TrackUpdateInterface, TrackCreationInterface
public function setUser(?User $user): self
{
if ($user instanceof User && $this->user instanceof User && $user !== $this->user) {
throw new \LogicException("Not allowed to associate an invite to a different user");
throw new LogicException('Not allowed to associate an invite to a different user');
}
$this->user = $user;