fix style

This commit is contained in:
André Lubian 2024-10-21 18:55:01 +02:00
parent 1537b157b5
commit 0c1cf45137
11 changed files with 49 additions and 38 deletions

View file

@ -1,12 +1,37 @@
<?php <?php declare(strict_types=1);
use ApiPlatform\Symfony\Bundle\ApiPlatformBundle;
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle;
use Nelmio\CorsBundle\NelmioCorsBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\MakerBundle\MakerBundle;
use Symfony\Bundle\SecurityBundle\SecurityBundle;
use Symfony\Bundle\TwigBundle\TwigBundle;
return [ return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], FrameworkBundle::class => [
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], 'all' => true,
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], ],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], MakerBundle::class => [
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], 'dev' => true,
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], ],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], DoctrineBundle::class => [
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true], 'all' => true,
],
DoctrineMigrationsBundle::class => [
'all' => true,
],
TwigBundle::class => [
'all' => true,
],
SecurityBundle::class => [
'all' => true,
],
NelmioCorsBundle::class => [
'all' => true,
],
ApiPlatformBundle::class => [
'all' => true,
],
]; ];

View file

@ -1,6 +1,4 @@
<?php <?php declare(strict_types=1);
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

View file

@ -1,6 +1,4 @@
<?php <?php declare(strict_types=1);
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;

View file

@ -1,6 +1,4 @@
<?php <?php declare(strict_types=1);
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;

View file

@ -1,6 +1,4 @@
<?php <?php declare(strict_types=1);
declare(strict_types=1);
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

View file

@ -1,6 +1,4 @@
<?php <?php declare(strict_types=1);
declare(strict_types=1);
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

View file

@ -44,7 +44,7 @@ final class FoodOrderController extends AbstractController
$prevPage = $page - 1; $prevPage = $page - 1;
$itemsPerPage = 10; $itemsPerPage = 10;
$count = $foodOrderRepository->count(); $count = $foodOrderRepository->count();
if($count < $page * $itemsPerPage) { if ($count < $page * $itemsPerPage) {
$nextPage = $page; $nextPage = $page;
} }

View file

@ -3,8 +3,6 @@
namespace App\Entity; namespace App\Entity;
use ApiPlatform\Metadata\ApiResource; use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use App\Repository\FoodOrderRepository; use App\Repository\FoodOrderRepository;
use DateInterval; use DateInterval;
use DateTimeImmutable; use DateTimeImmutable;

View file

@ -3,8 +3,6 @@
namespace App\Entity; namespace App\Entity;
use ApiPlatform\Metadata\ApiResource; use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use App\Repository\FoodVendorRepository; use App\Repository\FoodVendorRepository;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
@ -38,13 +36,17 @@ class FoodVendor
#[ORM\Column(length: 255, nullable: true)] #[ORM\Column(length: 255, nullable: true)]
private string|null $menuLink = null; private string|null $menuLink = null;
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\Column(type: UlidType::NAME, unique: true)]
#[ORM\CustomIdGenerator(class: UlidGenerator::class)]
private Ulid|null $id = null;
public function __construct( public function __construct(
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\Column(type: UlidType::NAME, unique: true)]
#[ORM\CustomIdGenerator(class: UlidGenerator::class)]
private Ulid|null $id = new Ulid
) { ) {
if (! $this->id instanceof Ulid) {
$this->id = new Ulid;
}
$this->foodOrders = new ArrayCollection; $this->foodOrders = new ArrayCollection;
$this->menuItems = new ArrayCollection; $this->menuItems = new ArrayCollection;
} }

View file

@ -3,8 +3,6 @@
namespace App\Entity; namespace App\Entity;
use ApiPlatform\Metadata\ApiResource; use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use App\Repository\MenuItemRepository; use App\Repository\MenuItemRepository;
use DateTimeImmutable; use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;

View file

@ -3,8 +3,6 @@
namespace App\Entity; namespace App\Entity;
use ApiPlatform\Metadata\ApiResource; use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use App\Repository\OrderItemRepository; use App\Repository\OrderItemRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator; use Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator;