mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -17,7 +17,6 @@ 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;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
@@ -30,6 +29,7 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
* name="chill_calendar.invite",
|
||||
* uniqueConstraints={@ORM\UniqueConstraint(name="idx_calendar_invite_remote", columns={"remoteId"}, options={"where": "remoteId <> ''"})}
|
||||
* )
|
||||
*
|
||||
* @ORM\Entity
|
||||
*/
|
||||
class Invite implements TrackUpdateInterface, TrackCreationInterface
|
||||
@@ -65,21 +65,27 @@ class Invite implements TrackUpdateInterface, TrackCreationInterface
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*
|
||||
* @Serializer\Groups(groups={"calendar:read", "read"})
|
||||
*/
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=false, options={"default": "pending"})
|
||||
*
|
||||
* @Serializer\Groups(groups={"calendar:read", "read", "docgen:read"})
|
||||
*/
|
||||
private string $status = self::PENDING;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User")
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*
|
||||
* @Serializer\Groups(groups={"calendar:read", "read", "docgen:read"})
|
||||
*/
|
||||
private ?User $user = null;
|
||||
@@ -122,7 +128,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