mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
fix cs and add EntityToIdTransformer
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user