From 7b58fcadfeb023bd179e2fdca13fae77c3a90b73 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 3 Mar 2022 11:15:12 -0500 Subject: [PATCH] More reformatting --- config/bundles.php | 16 +-- public/index.php | 4 +- src/Controller/CameraController.php | 8 +- src/Controller/CameraTypeController.php | 4 +- src/Controller/DefaultController.php | 3 +- src/Controller/FilmController.php | 4 +- src/Controller/FlashController.php | 4 +- src/Controller/FormControllerTrait.php | 4 +- src/Controller/LensesController.php | 8 +- .../PreviouslyOwnedCameraController.php | 4 +- .../PreviouslyOwnedFlashController.php | 4 +- .../PreviouslyOwnedLensesController.php | 4 +- src/Entity/BatteryType.php | 2 +- src/Entity/Camera.php | 2 +- src/Entity/CameraTrait.php | 32 ++--- src/Entity/CameraType.php | 8 +- src/Entity/Film.php | 34 ++--- src/Entity/Flash.php | 10 +- src/Entity/FlashTrait.php | 28 ++-- src/Entity/LensTrait.php | 38 +++--- src/Entity/Lenses.php | 10 +- src/Entity/PreviouslyOwnedCamera.php | 2 +- src/Entity/PreviouslyOwnedFlash.php | 10 +- src/Entity/PreviouslyOwnedLenses.php | 10 +- src/Entity/PurchasePriceTrait.php | 4 +- src/Form/CameraType.php | 6 +- src/Form/CameraTypeType.php | 3 +- src/Form/FilmType.php | 3 +- src/Form/FlashType.php | 3 +- src/Form/LensesType.php | 3 +- src/Form/PreviouslyOwnedCameraType.php | 3 +- src/Form/PreviouslyOwnedFlashType.php | 3 +- src/Form/PreviouslyOwnedLensesType.php | 3 +- src/Repository/AcquireTrait.php | 4 +- src/Repository/CameraRepository.php | 12 +- src/Repository/FlashRepository.php | 12 +- src/Repository/LensesRepository.php | 9 +- src/Types/MoneyType.php | 2 +- tools/ecs.php | 2 +- tools/rector.php | 34 ++--- translations/messages.en.php | 128 +++++++++--------- 41 files changed, 220 insertions(+), 267 deletions(-) diff --git a/config/bundles.php b/config/bundles.php index ecbdfce..58337aa 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -1,12 +1,12 @@ ['all' => true], - Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], - Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], - Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], - Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], - Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], - Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], - Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], + Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => TRUE], + Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => TRUE], + Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => TRUE], + Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => TRUE], + Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => TRUE, 'test' => TRUE], + Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => TRUE], + Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => TRUE], + Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => TRUE], ]; diff --git a/public/index.php b/public/index.php index b7f3e23..d00a432 100644 --- a/public/index.php +++ b/public/index.php @@ -17,11 +17,11 @@ if ($_SERVER['APP_DEBUG']) { Debug::enable(); } -if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? false) { +if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? FALSE) { Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST); } -if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? false) { +if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? FALSE) { Request::setTrustedHosts([$trustedHosts]); } diff --git a/src/Controller/CameraController.php b/src/Controller/CameraController.php index fd2c740..361a96c 100644 --- a/src/Controller/CameraController.php +++ b/src/Controller/CameraController.php @@ -9,9 +9,7 @@ use Doctrine\Persistence\ManagerRegistry; use LogicException; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\FormInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response}; use Symfony\Component\Routing\Annotation\Route; /** @@ -37,7 +35,7 @@ class CameraController extends AbstractController { $em = $this->managerRegistry->getManager(); $receivedItems = $em->getRepository(self::ENTITY)->findBy([ - 'received' => true, + 'received' => TRUE, ], [ 'isWorking' => 'ASC', 'brand' => 'ASC', @@ -45,7 +43,7 @@ class CameraController extends AbstractController 'model' => 'ASC', ]); $newItems = $em->getRepository(self::ENTITY)->findBy([ - 'received' => false, + 'received' => FALSE, ], [ 'brand' => 'ASC', 'mount' => 'ASC', diff --git a/src/Controller/CameraTypeController.php b/src/Controller/CameraTypeController.php index 0011158..bd30f63 100644 --- a/src/Controller/CameraTypeController.php +++ b/src/Controller/CameraTypeController.php @@ -7,9 +7,7 @@ use App\Form\CameraTypeType; use Doctrine\Persistence\ManagerRegistry; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\FormInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response}; use Symfony\Component\Routing\Annotation\Route; #[Route(path: 'camera-type')] diff --git a/src/Controller/DefaultController.php b/src/Controller/DefaultController.php index 34d1d9f..8f38507 100644 --- a/src/Controller/DefaultController.php +++ b/src/Controller/DefaultController.php @@ -3,8 +3,7 @@ namespace App\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{Request, Response}; use Symfony\Component\Routing\Annotation\Route; class DefaultController extends AbstractController diff --git a/src/Controller/FilmController.php b/src/Controller/FilmController.php index e1c1b72..4010dfc 100644 --- a/src/Controller/FilmController.php +++ b/src/Controller/FilmController.php @@ -9,9 +9,7 @@ use Doctrine\Persistence\ManagerRegistry; use LogicException; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\FormInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response}; use Symfony\Component\Routing\Annotation\Route; /** diff --git a/src/Controller/FlashController.php b/src/Controller/FlashController.php index 0cdd3fe..4f5891c 100644 --- a/src/Controller/FlashController.php +++ b/src/Controller/FlashController.php @@ -7,9 +7,7 @@ use App\Form\FlashType; use Doctrine\Persistence\ManagerRegistry; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\FormInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response}; use Symfony\Component\Routing\Annotation\Route; /** diff --git a/src/Controller/FormControllerTrait.php b/src/Controller/FormControllerTrait.php index 78f61a5..1cc5279 100644 --- a/src/Controller/FormControllerTrait.php +++ b/src/Controller/FormControllerTrait.php @@ -4,9 +4,7 @@ namespace App\Controller; use Doctrine\Persistence\ManagerRegistry; use Symfony\Component\Form\FormInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response}; trait FormControllerTrait { diff --git a/src/Controller/LensesController.php b/src/Controller/LensesController.php index 93d9533..595aa39 100644 --- a/src/Controller/LensesController.php +++ b/src/Controller/LensesController.php @@ -7,9 +7,7 @@ use App\Form\LensesType; use Doctrine\Persistence\ManagerRegistry; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\FormInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response}; use Symfony\Component\Routing\Annotation\Route; /** @@ -35,7 +33,7 @@ class LensesController extends AbstractController { $em = $this->managerRegistry->getManager(); $receivedItems = $em->getRepository(self::ENTITY)->findBy([ - 'received' => true, + 'received' => TRUE, ], [ 'brand' => 'ASC', 'productLine' => 'ASC', @@ -44,7 +42,7 @@ class LensesController extends AbstractController 'maxFStop' => 'ASC', ]); $newItems = $em->getRepository(self::ENTITY)->findBy([ - 'received' => false, + 'received' => FALSE, ], [ 'brand' => 'ASC', 'productLine' => 'ASC', diff --git a/src/Controller/PreviouslyOwnedCameraController.php b/src/Controller/PreviouslyOwnedCameraController.php index 65c4170..84a13b5 100644 --- a/src/Controller/PreviouslyOwnedCameraController.php +++ b/src/Controller/PreviouslyOwnedCameraController.php @@ -9,9 +9,7 @@ use Doctrine\Persistence\ManagerRegistry; use LogicException; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Form\FormInterface; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response}; use Symfony\Component\Routing\Annotation\Route; use UnexpectedValueException; diff --git a/src/Controller/PreviouslyOwnedFlashController.php b/src/Controller/PreviouslyOwnedFlashController.php index 1c9ccf0..d65cd9f 100644 --- a/src/Controller/PreviouslyOwnedFlashController.php +++ b/src/Controller/PreviouslyOwnedFlashController.php @@ -6,9 +6,7 @@ use App\Entity\PreviouslyOwnedFlash; use App\Form\PreviouslyOwnedFlashType; use Doctrine\Persistence\ManagerRegistry; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response}; use Symfony\Component\Routing\Annotation\Route; /** diff --git a/src/Controller/PreviouslyOwnedLensesController.php b/src/Controller/PreviouslyOwnedLensesController.php index 9e538c1..34eb39d 100644 --- a/src/Controller/PreviouslyOwnedLensesController.php +++ b/src/Controller/PreviouslyOwnedLensesController.php @@ -6,9 +6,7 @@ use App\Entity\PreviouslyOwnedLenses; use App\Form\PreviouslyOwnedLensesType; use Doctrine\Persistence\ManagerRegistry; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; -use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response}; use Symfony\Component\Routing\Annotation\Route; #[Route(path: 'previously-owned-lens')] diff --git a/src/Entity/BatteryType.php b/src/Entity/BatteryType.php index a3f98e6..7b58673 100644 --- a/src/Entity/BatteryType.php +++ b/src/Entity/BatteryType.php @@ -11,7 +11,7 @@ use Doctrine\ORM\Mapping as ORM; #[ORM\Entity] class BatteryType { - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] + #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'IDENTITY')] private int $id; diff --git a/src/Entity/Camera.php b/src/Entity/Camera.php index a1d9ef3..aca5b23 100644 --- a/src/Entity/Camera.php +++ b/src/Entity/Camera.php @@ -15,7 +15,7 @@ class Camera { use CameraTrait; - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] + #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\SequenceGenerator(sequenceName: 'camera__id_seq', allocationSize: 1, initialValue: 1)] diff --git a/src/Entity/CameraTrait.php b/src/Entity/CameraTrait.php index d91966f..2b28653 100644 --- a/src/Entity/CameraTrait.php +++ b/src/Entity/CameraTrait.php @@ -14,51 +14,51 @@ trait CameraTrait use PurchasePriceTrait; #[ORM\ManyToOne(targetEntity: 'CameraType')] - #[ORM\JoinColumn(name: 'type_id', referencedColumnName: 'id', nullable: false)] + #[ORM\JoinColumn(name: 'type_id', referencedColumnName: 'id', nullable: FALSE)] private readonly CameraType $type; - #[ORM\Column(name: 'brand', type: 'string', length: 64, nullable: false)] + #[ORM\Column(name: 'brand', type: 'string', length: 64, nullable: FALSE)] private readonly string $brand; - #[ORM\Column(name: 'mount', type: 'string', length: 32, nullable: false)] + #[ORM\Column(name: 'mount', type: 'string', length: 32, nullable: FALSE)] private readonly string $mount; - #[ORM\Column(name: 'model', type: 'string', length: 255, nullable: false)] + #[ORM\Column(name: 'model', type: 'string', length: 255, nullable: FALSE)] private readonly string $model; - #[ORM\Column(name: 'is_digital', type: 'boolean', nullable: false)] + #[ORM\Column(name: 'is_digital', type: 'boolean', nullable: FALSE)] private readonly bool $isDigital; - #[ORM\Column(name: 'crop_factor', type: 'decimal', precision: 10, scale: 0, nullable: false)] + #[ORM\Column(name: 'crop_factor', type: 'decimal', precision: 10, scale: 0, nullable: FALSE)] private string $cropFactor = '1.0'; - #[ORM\Column(name: 'is_working', type: 'boolean', nullable: false)] + #[ORM\Column(name: 'is_working', type: 'boolean', nullable: FALSE)] private readonly bool $isWorking; - #[ORM\Column(name: 'notes', type: 'text', nullable: true)] + #[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)] private readonly ?string $notes; - #[ORM\Column(name: 'serial', type: 'string', length: 20, nullable: false)] + #[ORM\Column(name: 'serial', type: 'string', length: 20, nullable: FALSE)] private readonly string $serial; - #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: false)] - private bool $formerlyOwned = false; + #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE)] + private bool $formerlyOwned = FALSE; - #[ORM\Column(name: 'battery_type', type: 'string', nullable: true)] + #[ORM\Column(name: 'battery_type', type: 'string', nullable: TRUE)] private readonly ?string $batteryType; - #[ORM\Column(name: 'film_format', type: 'string', nullable: true)] + #[ORM\Column(name: 'film_format', type: 'string', nullable: TRUE)] private ?string $filmFormat = '135'; - #[ORM\Column(name: 'received', type: 'boolean', nullable: true)] - private ?bool $received = false; + #[ORM\Column(name: 'received', type: 'boolean', nullable: TRUE)] + private ?bool $received = FALSE; public function getId(): int { return $this->id; } - public function setType(?CameraType $type = null): self + public function setType(?CameraType $type = NULL): self { $this->type = $type; diff --git a/src/Entity/CameraType.php b/src/Entity/CameraType.php index 8bd7061..6f56b64 100644 --- a/src/Entity/CameraType.php +++ b/src/Entity/CameraType.php @@ -12,17 +12,17 @@ use Stringable; #[ORM\Entity] class CameraType implements Stringable { - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] + #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\SequenceGenerator(sequenceName: 'camera.camera_type_id_seq', allocationSize: 1, initialValue: 1)] private int $id; - #[ORM\Column(name: 'type', type: 'string', length: 255, nullable: false)] + #[ORM\Column(name: 'type', type: 'string', length: 255, nullable: FALSE)] private string $type; - #[ORM\Column(name: 'description', type: 'text', nullable: true)] - private ?string $description = null; + #[ORM\Column(name: 'description', type: 'text', nullable: TRUE)] + private ?string $description = NULL; /** * Value for serialization diff --git a/src/Entity/Film.php b/src/Entity/Film.php index ccbd148..560d953 100644 --- a/src/Entity/Film.php +++ b/src/Entity/Film.php @@ -12,48 +12,48 @@ use Doctrine\ORM\Mapping as ORM; class Film { #[ORM\Id] - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] + #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)] #[ORM\GeneratedValue(strategy: 'IDENTITY')] private int $id; - #[ORM\Column(name: 'brand', type: 'string', nullable: false)] + #[ORM\Column(name: 'brand', type: 'string', nullable: FALSE)] private string $brand; - #[ORM\Column(name: 'product_line', type: 'string', nullable: true)] - private ?string $productLine = null; + #[ORM\Column(name: 'product_line', type: 'string', nullable: TRUE)] + private ?string $productLine = NULL; - #[ORM\Column(name: 'film_name', type: 'string', nullable: false)] + #[ORM\Column(name: 'film_name', type: 'string', nullable: FALSE)] private string $filmName; - #[ORM\Column(name: 'film_alias', type: 'string', nullable: true)] - private ?string $filmAlias = null; + #[ORM\Column(name: 'film_alias', type: 'string', nullable: TRUE)] + private ?string $filmAlias = NULL; - #[ORM\Column(name: 'film_speed_asa', type: 'integer', nullable: false)] + #[ORM\Column(name: 'film_speed_asa', type: 'integer', nullable: FALSE)] private int $filmSpeedAsa; - #[ORM\Column(name: 'film_speed_din', type: 'integer', nullable: false)] + #[ORM\Column(name: 'film_speed_din', type: 'integer', nullable: FALSE)] private int $filmSpeedDin; - #[ORM\Column(name: 'film_format', type: 'string', nullable: false)] + #[ORM\Column(name: 'film_format', type: 'string', nullable: FALSE)] private string $filmFormat; - #[ORM\Column(name: 'film_base', type: 'string', nullable: false, options: ['default' => 'Cellulose Triacetate'])] + #[ORM\Column(name: 'film_base', type: 'string', nullable: FALSE, options: ['default' => 'Cellulose Triacetate'])] private string $filmBase = 'Cellulose Triacetate'; - #[ORM\Column(name: 'unused_rolls', type: 'integer', nullable: false, options: ['default' => 0])] + #[ORM\Column(name: 'unused_rolls', type: 'integer', nullable: FALSE, options: ['default' => 0])] private int $unusedRolls = 0; - #[ORM\Column(name: 'rolls_in_camera', type: 'integer', nullable: false, options: ['default' => 0])] + #[ORM\Column(name: 'rolls_in_camera', type: 'integer', nullable: FALSE, options: ['default' => 0])] private int $rollsInCamera = 0; - #[ORM\Column(name: 'developed_rolls', type: 'integer', nullable: false, options: ['default' => 0])] + #[ORM\Column(name: 'developed_rolls', type: 'integer', nullable: FALSE, options: ['default' => 0])] private int $developedRolls = 0; - #[ORM\Column(name: 'chemistry', type: 'string', nullable: false, options: ['default' => 'C-41'])] + #[ORM\Column(name: 'chemistry', type: 'string', nullable: FALSE, options: ['default' => 'C-41'])] private string $chemistry = 'C-41'; - #[ORM\Column(name: 'notes', type: 'text', nullable: true)] - private ?string $notes = null; + #[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)] + private ?string $notes = NULL; public function getId(): int { diff --git a/src/Entity/Flash.php b/src/Entity/Flash.php index 7ba42ca..415170f 100644 --- a/src/Entity/Flash.php +++ b/src/Entity/Flash.php @@ -13,15 +13,15 @@ class Flash { use FlashTrait; - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] + #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\SequenceGenerator(sequenceName: 'camera.flash_id_seq', allocationSize: 1, initialValue: 1)] private int $id; - #[ORM\Column(name: 'received', type: 'boolean', nullable: false, options: ['default' => false])] - private bool $received = false; + #[ORM\Column(name: 'received', type: 'boolean', nullable: FALSE, options: ['default' => FALSE])] + private bool $received = FALSE; - #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: false, options: ['default' => false])] - private bool $formerlyOwned = false; + #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE, options: ['default' => FALSE])] + private bool $formerlyOwned = FALSE; } diff --git a/src/Entity/FlashTrait.php b/src/Entity/FlashTrait.php index 2cfd875..2dd5d94 100644 --- a/src/Entity/FlashTrait.php +++ b/src/Entity/FlashTrait.php @@ -8,37 +8,37 @@ trait FlashTrait { use PurchasePriceTrait; - #[ORM\Column(name: 'brand', type: 'string', nullable: false)] + #[ORM\Column(name: 'brand', type: 'string', nullable: FALSE)] private readonly string $brand; - #[ORM\Column(name: 'model', type: 'string', nullable: false)] + #[ORM\Column(name: 'model', type: 'string', nullable: FALSE)] private readonly string $model; - #[ORM\Column(name: 'is_auto_flash', type: 'boolean', nullable: false)] - private bool $isAutoFlash = false; + #[ORM\Column(name: 'is_auto_flash', type: 'boolean', nullable: FALSE)] + private bool $isAutoFlash = FALSE; - #[ORM\Column(name: 'is_ttl', type: 'boolean', nullable: false)] - private bool $isTtl = false; + #[ORM\Column(name: 'is_ttl', type: 'boolean', nullable: FALSE)] + private bool $isTtl = FALSE; - #[ORM\Column(name: 'ttl_type', type: 'string', nullable: false)] + #[ORM\Column(name: 'ttl_type', type: 'string', nullable: FALSE)] private string $ttlType = 'N / A'; - #[ORM\Column(name: 'is_p_ttl', type: 'boolean', nullable: false)] - private bool $isPTtl = false; + #[ORM\Column(name: 'is_p_ttl', type: 'boolean', nullable: FALSE)] + private bool $isPTtl = FALSE; - #[ORM\Column(name: 'p_ttl_type', type: 'string', nullable: false)] + #[ORM\Column(name: 'p_ttl_type', type: 'string', nullable: FALSE)] private string $pTtlType = 'N / A'; - #[ORM\Column(name: 'guide_number', type: 'string', nullable: true)] + #[ORM\Column(name: 'guide_number', type: 'string', nullable: TRUE)] private ?string $guideNumber = ''; - #[ORM\Column(name: 'batteries', type: 'string', nullable: false)] + #[ORM\Column(name: 'batteries', type: 'string', nullable: FALSE)] private string $batteries = '4x AA'; - #[ORM\Column(name: 'notes', type: 'text', nullable: true)] + #[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)] private readonly ?string $notes; - #[ORM\Column(name: 'serial', type: 'string', nullable: true)] + #[ORM\Column(name: 'serial', type: 'string', nullable: TRUE)] private readonly ?string $serial; public function getId(): int diff --git a/src/Entity/LensTrait.php b/src/Entity/LensTrait.php index 9a75fb5..4d2e22b 100644 --- a/src/Entity/LensTrait.php +++ b/src/Entity/LensTrait.php @@ -8,58 +8,58 @@ trait LensTrait { use PurchasePriceTrait; - #[ORM\Column(name: 'brand', type: 'string', length: 64, nullable: true)] + #[ORM\Column(name: 'brand', type: 'string', length: 64, nullable: TRUE)] private readonly ?string $brand; - #[ORM\Column(name: 'coatings', type: 'string', length: 64, nullable: true)] + #[ORM\Column(name: 'coatings', type: 'string', length: 64, nullable: TRUE)] private readonly ?string $coatings; - #[ORM\Column(name: 'product_line', type: 'string', length: 64, nullable: true)] + #[ORM\Column(name: 'product_line', type: 'string', length: 64, nullable: TRUE)] private readonly ?string $productLine; - #[ORM\Column(name: 'model', type: 'string', length: 64, nullable: true)] + #[ORM\Column(name: 'model', type: 'string', length: 64, nullable: TRUE)] private readonly ?string $model; - #[ORM\Column(name: 'min_f_stop', type: 'string', length: 10, nullable: true)] + #[ORM\Column(name: 'min_f_stop', type: 'string', length: 10, nullable: TRUE)] private readonly ?string $minFStop; - #[ORM\Column(name: 'max_f_stop', type: 'float', precision: 10, scale: 0, nullable: true)] + #[ORM\Column(name: 'max_f_stop', type: 'float', precision: 10, scale: 0, nullable: TRUE)] private readonly ?float $maxFStop; - #[ORM\Column(name: 'min_focal_length', type: 'integer', nullable: true)] + #[ORM\Column(name: 'min_focal_length', type: 'integer', nullable: TRUE)] private readonly ?int $minFocalLength; - #[ORM\Column(name: 'max_focal_length', type: 'integer', nullable: true)] + #[ORM\Column(name: 'max_focal_length', type: 'integer', nullable: TRUE)] private readonly ?int $maxFocalLength; - #[ORM\Column(name: 'serial', type: 'string', length: 10, nullable: true)] + #[ORM\Column(name: 'serial', type: 'string', length: 10, nullable: TRUE)] private readonly ?string $serial; - #[ORM\Column(name: 'notes', type: 'text', nullable: true)] + #[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)] private readonly ?string $notes; - #[ORM\Column(name: 'image_size', type: 'string', nullable: false, options: ['default' => '35mm'])] + #[ORM\Column(name: 'image_size', type: 'string', nullable: FALSE, options: ['default' => '35mm'])] private string $imageSize = '35mm'; - #[ORM\Column(name: 'mount', type: 'string', length: 40, nullable: true)] + #[ORM\Column(name: 'mount', type: 'string', length: 40, nullable: TRUE)] private readonly ?string $mount; - #[ORM\Column(name: 'front_filter_size', type: 'decimal', precision: 10, scale: 0, nullable: true)] + #[ORM\Column(name: 'front_filter_size', type: 'decimal', precision: 10, scale: 0, nullable: TRUE)] private readonly ?string $frontFilterSize; - #[ORM\Column(name: 'rear_filter_size', type: 'decimal', precision: 10, scale: 0, nullable: true)] + #[ORM\Column(name: 'rear_filter_size', type: 'decimal', precision: 10, scale: 0, nullable: TRUE)] private readonly ?string $rearFilterSize; - #[ORM\Column(name: 'is_teleconverter', type: 'boolean', nullable: false)] - private bool $isTeleconverter = false; + #[ORM\Column(name: 'is_teleconverter', type: 'boolean', nullable: FALSE)] + private bool $isTeleconverter = FALSE; - #[ORM\Column(name: 'design_elements', type: 'smallint', nullable: true)] + #[ORM\Column(name: 'design_elements', type: 'smallint', nullable: TRUE)] private readonly ?int $designElements; - #[ORM\Column(name: 'design_groups', type: 'smallint', nullable: true)] + #[ORM\Column(name: 'design_groups', type: 'smallint', nullable: TRUE)] private readonly ?int $designGroups; - #[ORM\Column(name: 'aperture_blades', type: 'smallint', nullable: true)] + #[ORM\Column(name: 'aperture_blades', type: 'smallint', nullable: TRUE)] private readonly ?int $apertureBlades; /** diff --git a/src/Entity/Lenses.php b/src/Entity/Lenses.php index 6cb4007..3d4ef9a 100644 --- a/src/Entity/Lenses.php +++ b/src/Entity/Lenses.php @@ -14,15 +14,15 @@ class Lenses { use LensTrait; - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] + #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\SequenceGenerator(sequenceName: 'camera.lenses_id_seq', allocationSize: 1, initialValue: 1)] private int $id; - #[ORM\Column(name: 'received', type: 'boolean', nullable: false)] - private bool $received = false; + #[ORM\Column(name: 'received', type: 'boolean', nullable: FALSE)] + private bool $received = FALSE; - #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: false)] - private bool $formerlyOwned = false; + #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE)] + private bool $formerlyOwned = FALSE; } diff --git a/src/Entity/PreviouslyOwnedCamera.php b/src/Entity/PreviouslyOwnedCamera.php index e241c89..c7d41b0 100644 --- a/src/Entity/PreviouslyOwnedCamera.php +++ b/src/Entity/PreviouslyOwnedCamera.php @@ -15,7 +15,7 @@ class PreviouslyOwnedCamera { use CameraTrait; - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] + #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\SequenceGenerator(sequenceName: 'prevously_owned_camera_id_seq', allocationSize: 1, initialValue: 1)] diff --git a/src/Entity/PreviouslyOwnedFlash.php b/src/Entity/PreviouslyOwnedFlash.php index 3fa94f3..d3ae406 100644 --- a/src/Entity/PreviouslyOwnedFlash.php +++ b/src/Entity/PreviouslyOwnedFlash.php @@ -13,14 +13,14 @@ class PreviouslyOwnedFlash { use FlashTrait; - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] + #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'IDENTITY')] private int $id; - #[ORM\Column(name: 'received', type: 'boolean', nullable: false, options: ['default' => true])] - private bool $received = true; + #[ORM\Column(name: 'received', type: 'boolean', nullable: FALSE, options: ['default' => TRUE])] + private bool $received = TRUE; - #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: false, options: ['default' => true])] - private bool $formerlyOwned = true; + #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE, options: ['default' => TRUE])] + private bool $formerlyOwned = TRUE; } diff --git a/src/Entity/PreviouslyOwnedLenses.php b/src/Entity/PreviouslyOwnedLenses.php index 413e109..233a40b 100644 --- a/src/Entity/PreviouslyOwnedLenses.php +++ b/src/Entity/PreviouslyOwnedLenses.php @@ -14,14 +14,14 @@ class PreviouslyOwnedLenses { use LensTrait; - #[ORM\Column(name: 'id', type: 'integer', nullable: false)] + #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)] #[ORM\Id] #[ORM\GeneratedValue(strategy: 'IDENTITY')] private int $id; - #[ORM\Column(name: 'received', type: 'boolean', nullable: false)] - private bool $received = true; + #[ORM\Column(name: 'received', type: 'boolean', nullable: FALSE)] + private bool $received = TRUE; - #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: false)] - private bool $formerlyOwned = true; + #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE)] + private bool $formerlyOwned = TRUE; } diff --git a/src/Entity/PurchasePriceTrait.php b/src/Entity/PurchasePriceTrait.php index 7feb311..0ae237a 100644 --- a/src/Entity/PurchasePriceTrait.php +++ b/src/Entity/PurchasePriceTrait.php @@ -6,8 +6,8 @@ use Doctrine\ORM\Mapping as ORM; trait PurchasePriceTrait { - #[ORM\Column(name: 'purchase_price', type: 'money', nullable: true)] - private ?string $purchasePrice = null; + #[ORM\Column(name: 'purchase_price', type: 'money', nullable: TRUE)] + private ?string $purchasePrice = NULL; public function setPurchasePrice(?string $purchasePrice): self { diff --git a/src/Form/CameraType.php b/src/Form/CameraType.php index ceead9a..d3f9f38 100644 --- a/src/Form/CameraType.php +++ b/src/Form/CameraType.php @@ -3,10 +3,8 @@ namespace App\Form; use App\Entity\Camera; -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\Extension\Core\Type\MoneyType; -use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\Extension\Core\Type\{ChoiceType, MoneyType}; +use Symfony\Component\Form\{AbstractType, FormBuilderInterface}; use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Form/CameraTypeType.php b/src/Form/CameraTypeType.php index c66d0b4..f32d508 100644 --- a/src/Form/CameraTypeType.php +++ b/src/Form/CameraTypeType.php @@ -3,8 +3,7 @@ namespace App\Form; use App\Entity\CameraType; -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\{AbstractType, FormBuilderInterface}; use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Form/FilmType.php b/src/Form/FilmType.php index 0ecaccb..1a7eaa8 100644 --- a/src/Form/FilmType.php +++ b/src/Form/FilmType.php @@ -3,9 +3,8 @@ namespace App\Form; use App\Entity\Film; -use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\{AbstractType, FormBuilderInterface}; use Symfony\Component\OptionsResolver\OptionsResolver; class FilmType extends AbstractType diff --git a/src/Form/FlashType.php b/src/Form/FlashType.php index 7a02842..e911e33 100644 --- a/src/Form/FlashType.php +++ b/src/Form/FlashType.php @@ -3,8 +3,7 @@ namespace App\Form; use App\Entity\Flash; -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\{AbstractType, FormBuilderInterface}; use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Form/LensesType.php b/src/Form/LensesType.php index 74460c5..cd4b3a8 100644 --- a/src/Form/LensesType.php +++ b/src/Form/LensesType.php @@ -3,9 +3,8 @@ namespace App\Form; use App\Entity\Lenses; -use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; -use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\{AbstractType, FormBuilderInterface}; use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Form/PreviouslyOwnedCameraType.php b/src/Form/PreviouslyOwnedCameraType.php index c0348ee..29ad7c8 100644 --- a/src/Form/PreviouslyOwnedCameraType.php +++ b/src/Form/PreviouslyOwnedCameraType.php @@ -3,8 +3,7 @@ namespace App\Form; use App\Entity\PreviouslyOwnedCamera; -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\{AbstractType, FormBuilderInterface}; use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Form/PreviouslyOwnedFlashType.php b/src/Form/PreviouslyOwnedFlashType.php index a400b75..6110f0b 100644 --- a/src/Form/PreviouslyOwnedFlashType.php +++ b/src/Form/PreviouslyOwnedFlashType.php @@ -3,8 +3,7 @@ namespace App\Form; use App\Entity\PreviouslyOwnedFlash; -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\{AbstractType, FormBuilderInterface}; use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Form/PreviouslyOwnedLensesType.php b/src/Form/PreviouslyOwnedLensesType.php index 75e8262..b091e9b 100644 --- a/src/Form/PreviouslyOwnedLensesType.php +++ b/src/Form/PreviouslyOwnedLensesType.php @@ -3,8 +3,7 @@ namespace App\Form; use App\Entity\PreviouslyOwnedLenses; -use Symfony\Component\Form\AbstractType; -use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Form\{AbstractType, FormBuilderInterface}; use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\OptionsResolver; diff --git a/src/Repository/AcquireTrait.php b/src/Repository/AcquireTrait.php index b9b1d99..fa912a8 100644 --- a/src/Repository/AcquireTrait.php +++ b/src/Repository/AcquireTrait.php @@ -25,8 +25,8 @@ trait AcquireTrait $propertyName = $property->getName(); if ($new->hasProperty($propertyName)) { $newProperty = $new->getProperty($propertyName); - $newProperty->setAccessible(true); - $property->setAccessible(true); + $newProperty->setAccessible(TRUE); + $property->setAccessible(TRUE); $newProperty->setValue($newRecord, $property->getValue($currentRecord)); } } diff --git a/src/Repository/CameraRepository.php b/src/Repository/CameraRepository.php index 5761beb..090651b 100644 --- a/src/Repository/CameraRepository.php +++ b/src/Repository/CameraRepository.php @@ -2,10 +2,8 @@ namespace App\Repository; -use App\Entity\Camera; -use App\Entity\PreviouslyOwnedCamera; -use Doctrine\ORM\EntityRepository; -use Doctrine\ORM\ORMInvalidArgumentException; +use App\Entity\{Camera, PreviouslyOwnedCamera}; +use Doctrine\ORM\{EntityRepository, ORMInvalidArgumentException}; class CameraRepository extends EntityRepository { @@ -16,8 +14,8 @@ class CameraRepository extends EntityRepository */ public function deacquire(Camera $currentRecord): void { - $currentRecord->setFormerlyOwned(true) - ->setReceived(true); + $currentRecord->setFormerlyOwned(TRUE) + ->setReceived(TRUE); $this->moveRecord($currentRecord, new PreviouslyOwnedCamera()); } @@ -27,7 +25,7 @@ class CameraRepository extends EntityRepository */ public function reacquire(PreviouslyOwnedCamera $currentRecord): void { - $currentRecord->setFormerlyOwned(false); + $currentRecord->setFormerlyOwned(FALSE); $this->moveRecord($currentRecord, new Camera()); } diff --git a/src/Repository/FlashRepository.php b/src/Repository/FlashRepository.php index 34732d9..f5845a6 100644 --- a/src/Repository/FlashRepository.php +++ b/src/Repository/FlashRepository.php @@ -2,10 +2,8 @@ namespace App\Repository; -use App\Entity\Flash; -use App\Entity\PreviouslyOwnedFlash; -use Doctrine\ORM\EntityRepository; -use Doctrine\ORM\ORMInvalidArgumentException; +use App\Entity\{Flash, PreviouslyOwnedFlash}; +use Doctrine\ORM\{EntityRepository, ORMInvalidArgumentException}; class FlashRepository extends EntityRepository { @@ -16,8 +14,8 @@ class FlashRepository extends EntityRepository */ public function deacquire(Flash $currentRecord): void { - $currentRecord->setFormerlyOwned(true) - ->setReceived(true); + $currentRecord->setFormerlyOwned(TRUE) + ->setReceived(TRUE); $this->moveRecord($currentRecord, new PreviouslyOwnedFlash()); } @@ -27,7 +25,7 @@ class FlashRepository extends EntityRepository */ public function reacquire(PreviouslyOwnedFlash $currentRecord): void { - $currentRecord->setFormerlyOwned(false); + $currentRecord->setFormerlyOwned(FALSE); $this->moveRecord($currentRecord, new Flash()); } diff --git a/src/Repository/LensesRepository.php b/src/Repository/LensesRepository.php index dae94cf..08163d5 100644 --- a/src/Repository/LensesRepository.php +++ b/src/Repository/LensesRepository.php @@ -2,8 +2,7 @@ namespace App\Repository; -use App\Entity\Lenses; -use App\Entity\PreviouslyOwnedLenses; +use App\Entity\{Lenses, PreviouslyOwnedLenses}; use Doctrine\ORM\EntityRepository; class LensesRepository extends EntityRepository @@ -12,15 +11,15 @@ class LensesRepository extends EntityRepository public function deacquire(Lenses $currentRecord): void { - $currentRecord->setFormerlyOwned(true) - ->setReceived(true); + $currentRecord->setFormerlyOwned(TRUE) + ->setReceived(TRUE); $this->moveRecord($currentRecord, new PreviouslyOwnedLenses()); } public function reacquire(PreviouslyOwnedLenses $currentRecord): void { - $currentRecord->setFormerlyOwned(false); + $currentRecord->setFormerlyOwned(FALSE); $this->moveRecord($currentRecord, new Lenses()); } diff --git a/src/Types/MoneyType.php b/src/Types/MoneyType.php index ea4d711..df9ce39 100644 --- a/src/Types/MoneyType.php +++ b/src/Types/MoneyType.php @@ -26,6 +26,6 @@ class MoneyType extends Type public function requiresSQLCommentHint(AbstractPlatform $platform): bool { - return true; + return TRUE; } } diff --git a/tools/ecs.php b/tools/ecs.php index 9bce71e..aee091b 100644 --- a/tools/ecs.php +++ b/tools/ecs.php @@ -14,6 +14,6 @@ return static function (ContainerConfigurator $config): void { DeclareStrictTypesFixer::class, ]); - $parameters->set(Option::PARALLEL, true); + $parameters->set(Option::PARALLEL, TRUE); $parameters->set(Option::PATHS, [__DIR__ . '/../src', __DIR__]); }; diff --git a/tools/rector.php b/tools/rector.php index 67da4a1..66348dd 100644 --- a/tools/rector.php +++ b/tools/rector.php @@ -2,42 +2,28 @@ use Rector\CodeQuality\Rector\BooleanNot\SimplifyDeMorganBinaryRector; use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; -use Rector\CodeQuality\Rector\For_\ForRepeatedCountToOwnVariableRector; -use Rector\CodeQuality\Rector\For_\ForToForeachRector; -use Rector\CodeQuality\Rector\If_\ConsecutiveNullCompareReturnsToNullCoalesceQueueRector; -use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector; -use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector; -use Rector\CodeQuality\Rector\Ternary\SimplifyDuplicatedTernaryRector; -use Rector\CodeQuality\Rector\Ternary\SimplifyTautologyTernaryRector; -use Rector\CodeQuality\Rector\Ternary\SwitchNegatedTernaryRector; +use Rector\CodeQuality\Rector\For_\{ForRepeatedCountToOwnVariableRector, ForToForeachRector}; +use Rector\CodeQuality\Rector\If_\{ConsecutiveNullCompareReturnsToNullCoalesceQueueRector, SimplifyIfElseToTernaryRector, SimplifyIfReturnBoolRector}; +use Rector\CodeQuality\Rector\Ternary\{SimplifyDuplicatedTernaryRector, SimplifyTautologyTernaryRector, SwitchNegatedTernaryRector}; use Rector\CodingStyle\Rector\Class_\AddArrayDefaultToArrayPropertyRector; use Rector\CodingStyle\Rector\ClassConst\RemoveFinalFromConstRector; use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector; use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector; -use Rector\CodingStyle\Rector\FuncCall\CallUserFuncArrayToVariadicRector; -use Rector\CodingStyle\Rector\FuncCall\CallUserFuncToMethodCallRector; -use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector; +use Rector\CodingStyle\Rector\FuncCall\{CallUserFuncArrayToVariadicRector, CallUserFuncToMethodCallRector, CountArrayToEmptyArrayComparisonRector}; use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector; use Rector\Core\Configuration\Option; -use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector; -use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector; +use Rector\DeadCode\Rector\ClassMethod\{RemoveUselessParamTagRector, RemoveUselessReturnTagRector}; use Rector\DeadCode\Rector\Foreach_\RemoveUnusedForeachKeyRector; use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector; use Rector\DeadCode\Rector\Switch_\RemoveDuplicatedCaseInSwitchRector; use Rector\Doctrine\Set\DoctrineSetList; use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; -use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; -use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector; +use Rector\EarlyReturn\Rector\If_\{ChangeIfElseValueAssignToEarlyReturnRector, RemoveAlwaysElseRector}; use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; use Rector\Restoration\Rector\Property\MakeTypedPropertyNullableIfCheckedRector; use Rector\Set\ValueObject\LevelSetList; -use Rector\Symfony\Set\SymfonyLevelSetList; -use Rector\Symfony\Set\SymfonySetList; -use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayParamDocTypeRector; -use Rector\TypeDeclaration\Rector\ClassMethod\AddArrayReturnDocTypeRector; -use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector; -use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByMethodCallTypeRector; -use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByParentCallTypeRector; +use Rector\Symfony\Set\{SymfonyLevelSetList, SymfonySetList}; +use Rector\TypeDeclaration\Rector\ClassMethod\{AddArrayParamDocTypeRector, AddArrayReturnDocTypeRector, AddMethodCallBasedStrictParamTypeRector, ParamTypeByMethodCallTypeRector, ParamTypeByParentCallTypeRector}; use Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector; use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; @@ -46,8 +32,8 @@ require_once __DIR__ . '/common.inc.php'; return static function (ContainerConfigurator $config): void { $parameters = $config->parameters(); - $parameters->set(Option::AUTO_IMPORT_NAMES, true); - $parameters->set(Option::IMPORT_SHORT_CLASSES, true); + $parameters->set(Option::AUTO_IMPORT_NAMES, TRUE); + $parameters->set(Option::IMPORT_SHORT_CLASSES, TRUE); $parameters->set(Option::SKIP, [ ReadOnlyPropertyRector::class, ]); diff --git a/translations/messages.en.php b/translations/messages.en.php index 64455d3..7ac1314 100644 --- a/translations/messages.en.php +++ b/translations/messages.en.php @@ -1,68 +1,68 @@ '', - '4x4' => '4x4cm', - '6x4.5' => '6x4.5cm', - '6x6' => '6x6cm', - '35mm' => '35mm', - '110' => '110', - '120' => '120', - '127' => '127', - '620' => '620', - 'Aperture blades' => '# of Aperture Blades', - 'APS-C' => 'APS-C', - 'B & W' => 'B & W', - 'Batteries' => 'Batteries', - 'Battery type' => 'Battery Type', - 'Brand' => 'Brand', - 'C-41' => 'C-41', - 'Cellulose Triacetate' => 'Cellulose Triacetate', - 'Chemistry' => 'Film Chemistry', - 'Coatings' => 'Coatings', - 'Crop factor' => 'Crop Factor', - 'Description' => 'Description', - 'Design elements' => '# of Design Elements', - 'Design groups' => '# of Design Groups', - 'Developed rolls' => '# of Developed Rolls', - 'E-6' => 'E-6', - 'Film alias' => 'Film Alias', - 'Film base' => 'Film Base', - 'Film format' => 'Film Format', - 'Film name' => 'Film Name', - 'Film speed asa' => 'Film Speed (ASA)', - 'Film speed din' => 'Film Speed (DIN)', - 'Formerly owned' => 'Formerly Owned', - 'Front filter size' => 'Front filter size (mm)', - 'Guide number' => 'Guide Number', - 'Image size' => 'Image Size', - 'Is auto flash' => 'Is auto flash', - 'Is digital' => 'Is Digital', - 'Is p ttl' => 'Is P-TTL', - 'Is teleconverter' => 'Is teleconverter', - 'Is ttl' => 'Is TTL', - 'Is working' => 'Is Working', - 'Max f stop' => 'Max aperture (smallest f number)', - 'Max focal length' => 'Max focal length (mm)', - 'Medium Format' => 'Medium Format', - 'Micro 4/3' => 'μ 4/3', - 'Min f stop' => 'Min aperture (largest f number)', - 'Min focal length' => 'Min focal length (mm)', - 'Model' => 'Model', - 'Mount' => 'Mount', - 'Notes' => 'Notes', - 'Other' => 'Other', - 'P ttl type' => 'P-TTL Type', - 'Polyester' => 'Polyester', - 'Polyethylene Naphtalate' => 'Polyethylene Naphtalate', - 'Product line' => 'Product Line', - 'Purchase price' => 'Purchase Price', - 'Rear filter size' => 'Rear filter size (mm)', - 'Received' => 'Received', - 'Rolls in camera' => '# of Rolls in a Camera', - 'Serial' => 'Serial', - 'Small Format' => 'Small Format', - 'Ttl type' => 'TTL Type', - 'Type' => 'Type', - 'Unused rolls' => '# of Unused Rolls', + '' => '', + '4x4' => '4x4cm', + '6x4.5' => '6x4.5cm', + '6x6' => '6x6cm', + '35mm' => '35mm', + '110' => '110', + '120' => '120', + '127' => '127', + '620' => '620', + 'Aperture blades' => '# of Aperture Blades', + 'APS-C' => 'APS-C', + 'B & W' => 'B & W', + 'Batteries' => 'Batteries', + 'Battery type' => 'Battery Type', + 'Brand' => 'Brand', + 'C-41' => 'C-41', + 'Cellulose Triacetate' => 'Cellulose Triacetate', + 'Chemistry' => 'Film Chemistry', + 'Coatings' => 'Coatings', + 'Crop factor' => 'Crop Factor', + 'Description' => 'Description', + 'Design elements' => '# of Design Elements', + 'Design groups' => '# of Design Groups', + 'Developed rolls' => '# of Developed Rolls', + 'E-6' => 'E-6', + 'Film alias' => 'Film Alias', + 'Film base' => 'Film Base', + 'Film format' => 'Film Format', + 'Film name' => 'Film Name', + 'Film speed asa' => 'Film Speed (ASA)', + 'Film speed din' => 'Film Speed (DIN)', + 'Formerly owned' => 'Formerly Owned', + 'Front filter size' => 'Front filter size (mm)', + 'Guide number' => 'Guide Number', + 'Image size' => 'Image Size', + 'Is auto flash' => 'Is auto flash', + 'Is digital' => 'Is Digital', + 'Is p ttl' => 'Is P-TTL', + 'Is teleconverter' => 'Is teleconverter', + 'Is ttl' => 'Is TTL', + 'Is working' => 'Is Working', + 'Max f stop' => 'Max aperture (smallest f number)', + 'Max focal length' => 'Max focal length (mm)', + 'Medium Format' => 'Medium Format', + 'Micro 4/3' => 'μ 4/3', + 'Min f stop' => 'Min aperture (largest f number)', + 'Min focal length' => 'Min focal length (mm)', + 'Model' => 'Model', + 'Mount' => 'Mount', + 'Notes' => 'Notes', + 'Other' => 'Other', + 'P ttl type' => 'P-TTL Type', + 'Polyester' => 'Polyester', + 'Polyethylene Naphtalate' => 'Polyethylene Naphtalate', + 'Product line' => 'Product Line', + 'Purchase price' => 'Purchase Price', + 'Rear filter size' => 'Rear filter size (mm)', + 'Received' => 'Received', + 'Rolls in camera' => '# of Rolls in a Camera', + 'Serial' => 'Serial', + 'Small Format' => 'Small Format', + 'Ttl type' => 'TTL Type', + 'Type' => 'Type', + 'Unused rolls' => '# of Unused Rolls', ];