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

@@ -15,8 +15,6 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Repository\LocationRepository;
use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint;
use DateTimeImmutable;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
use libphonenumber\PhoneNumber;
use Symfony\Component\Serializer\Annotation as Serializer;
@@ -24,7 +22,9 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
/**
* @ORM\Table(name="chill_main_location")
*
* @ORM\Entity(repositoryClass=LocationRepository::class)
*
* @DiscriminatorMap(typeProperty="type", mapping={
* "location": Location::class
* })
@@ -33,84 +33,103 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
{
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Serializer\Groups({"read"})
*/
private bool $active = true;
/**
* @ORM\ManyToOne(targetEntity=Address::class, cascade={"persist"})
*
* @ORM\JoinColumn(nullable=true)
*
* @Serializer\Groups({"read", "write", "docgen:read"})
*/
private ?Address $address = null;
/**
* @ORM\Column(type="boolean")
*
* @Serializer\Groups({"read"})
*/
private bool $availableForUsers = false;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*
* @Serializer\Groups({"read"})
*/
private ?DateTimeImmutable $createdAt = null;
private ?\DateTimeImmutable $createdAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*
* @Serializer\Groups({"read"})
*/
private ?User $createdBy = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*
* @Serializer\Groups({"read", "write", "docgen:read"})
*/
private ?string $email = null;
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity=LocationType::class)
*
* @ORM\JoinColumn(nullable=false)
*
* @Serializer\Groups({"read", "write", "docgen:read"})
*/
private ?LocationType $locationType = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*
* @Serializer\Groups({"read", "write", "docgen:read"})
*/
private ?string $name = null;
/**
* @ORM\Column(type="phone_number", nullable=true)
*
* @Serializer\Groups({"read", "write", "docgen:read"})
*
* @PhonenumberConstraint(type="any")
*/
private ?PhoneNumber $phonenumber1 = null;
/**
* @ORM\Column(type="phone_number", nullable=true)
*
* @Serializer\Groups({"read", "write", "docgen:read"})
*
* @PhonenumberConstraint(type="any")
*/
private ?PhoneNumber $phonenumber2 = null;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*
* @Serializer\Groups({"read"})
*/
private ?DateTimeImmutable $updatedAt = null;
private ?\DateTimeImmutable $updatedAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*
* @Serializer\Groups({"read"})
*/
private ?User $updatedBy = null;
@@ -130,7 +149,7 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
return $this->availableForUsers;
}
public function getCreatedAt(): ?DateTimeImmutable
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
@@ -170,7 +189,7 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
return $this->phonenumber2;
}
public function getUpdatedAt(): ?DateTimeImmutable
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
@@ -206,7 +225,7 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
return $this;
}
public function setCreatedAt(?DateTimeInterface $createdAt): self
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
@@ -255,7 +274,7 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
return $this;
}
public function setUpdatedAt(?DateTimeInterface $updatedAt): self
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;