apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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;