More reformatting

This commit is contained in:
Timothy Warren 2022-03-03 11:15:12 -05:00
parent 33993fba2c
commit 7b58fcadfe
41 changed files with 220 additions and 267 deletions

View File

@ -1,12 +1,12 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
return [ return [
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => TRUE],
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => TRUE],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => TRUE],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => TRUE],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => TRUE, 'test' => TRUE],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => TRUE],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => TRUE],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => TRUE],
]; ];

View File

@ -17,11 +17,11 @@ if ($_SERVER['APP_DEBUG']) {
Debug::enable(); 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); 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]); Request::setTrustedHosts([$trustedHosts]);
} }

View File

@ -9,9 +9,7 @@ use Doctrine\Persistence\ManagerRegistry;
use LogicException; use LogicException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response};
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
/** /**
@ -37,7 +35,7 @@ class CameraController extends AbstractController
{ {
$em = $this->managerRegistry->getManager(); $em = $this->managerRegistry->getManager();
$receivedItems = $em->getRepository(self::ENTITY)->findBy([ $receivedItems = $em->getRepository(self::ENTITY)->findBy([
'received' => true, 'received' => TRUE,
], [ ], [
'isWorking' => 'ASC', 'isWorking' => 'ASC',
'brand' => 'ASC', 'brand' => 'ASC',
@ -45,7 +43,7 @@ class CameraController extends AbstractController
'model' => 'ASC', 'model' => 'ASC',
]); ]);
$newItems = $em->getRepository(self::ENTITY)->findBy([ $newItems = $em->getRepository(self::ENTITY)->findBy([
'received' => false, 'received' => FALSE,
], [ ], [
'brand' => 'ASC', 'brand' => 'ASC',
'mount' => 'ASC', 'mount' => 'ASC',

View File

@ -7,9 +7,7 @@ use App\Form\CameraTypeType;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response};
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
#[Route(path: 'camera-type')] #[Route(path: 'camera-type')]

View File

@ -3,8 +3,7 @@
namespace App\Controller; namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\{Request, Response};
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
class DefaultController extends AbstractController class DefaultController extends AbstractController

View File

@ -9,9 +9,7 @@ use Doctrine\Persistence\ManagerRegistry;
use LogicException; use LogicException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response};
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
/** /**

View File

@ -7,9 +7,7 @@ use App\Form\FlashType;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response};
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
/** /**

View File

@ -4,9 +4,7 @@ namespace App\Controller;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response};
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
trait FormControllerTrait trait FormControllerTrait
{ {

View File

@ -7,9 +7,7 @@ use App\Form\LensesType;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response};
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
/** /**
@ -35,7 +33,7 @@ class LensesController extends AbstractController
{ {
$em = $this->managerRegistry->getManager(); $em = $this->managerRegistry->getManager();
$receivedItems = $em->getRepository(self::ENTITY)->findBy([ $receivedItems = $em->getRepository(self::ENTITY)->findBy([
'received' => true, 'received' => TRUE,
], [ ], [
'brand' => 'ASC', 'brand' => 'ASC',
'productLine' => 'ASC', 'productLine' => 'ASC',
@ -44,7 +42,7 @@ class LensesController extends AbstractController
'maxFStop' => 'ASC', 'maxFStop' => 'ASC',
]); ]);
$newItems = $em->getRepository(self::ENTITY)->findBy([ $newItems = $em->getRepository(self::ENTITY)->findBy([
'received' => false, 'received' => FALSE,
], [ ], [
'brand' => 'ASC', 'brand' => 'ASC',
'productLine' => 'ASC', 'productLine' => 'ASC',

View File

@ -9,9 +9,7 @@ use Doctrine\Persistence\ManagerRegistry;
use LogicException; use LogicException;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\FormInterface; use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response};
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use UnexpectedValueException; use UnexpectedValueException;

View File

@ -6,9 +6,7 @@ use App\Entity\PreviouslyOwnedFlash;
use App\Form\PreviouslyOwnedFlashType; use App\Form\PreviouslyOwnedFlashType;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response};
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
/** /**

View File

@ -6,9 +6,7 @@ use App\Entity\PreviouslyOwnedLenses;
use App\Form\PreviouslyOwnedLensesType; use App\Form\PreviouslyOwnedLensesType;
use Doctrine\Persistence\ManagerRegistry; use Doctrine\Persistence\ManagerRegistry;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\{RedirectResponse, Request, Response};
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
#[Route(path: 'previously-owned-lens')] #[Route(path: 'previously-owned-lens')]

View File

@ -11,7 +11,7 @@ use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
class BatteryType class BatteryType
{ {
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\GeneratedValue(strategy: 'IDENTITY')]
private int $id; private int $id;

View File

@ -15,7 +15,7 @@ class Camera
{ {
use CameraTrait; use CameraTrait;
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\GeneratedValue(strategy: 'IDENTITY')]
#[ORM\SequenceGenerator(sequenceName: 'camera__id_seq', allocationSize: 1, initialValue: 1)] #[ORM\SequenceGenerator(sequenceName: 'camera__id_seq', allocationSize: 1, initialValue: 1)]

View File

@ -14,51 +14,51 @@ trait CameraTrait
use PurchasePriceTrait; use PurchasePriceTrait;
#[ORM\ManyToOne(targetEntity: 'CameraType')] #[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; 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; 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; 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; 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; 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'; 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; private readonly bool $isWorking;
#[ORM\Column(name: 'notes', type: 'text', nullable: true)] #[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)]
private readonly ?string $notes; 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; private readonly string $serial;
#[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: false)] #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE)]
private bool $formerlyOwned = 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; 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'; private ?string $filmFormat = '135';
#[ORM\Column(name: 'received', type: 'boolean', nullable: true)] #[ORM\Column(name: 'received', type: 'boolean', nullable: TRUE)]
private ?bool $received = false; private ?bool $received = FALSE;
public function getId(): int public function getId(): int
{ {
return $this->id; return $this->id;
} }
public function setType(?CameraType $type = null): self public function setType(?CameraType $type = NULL): self
{ {
$this->type = $type; $this->type = $type;

View File

@ -12,17 +12,17 @@ use Stringable;
#[ORM\Entity] #[ORM\Entity]
class CameraType implements Stringable class CameraType implements Stringable
{ {
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\GeneratedValue(strategy: 'IDENTITY')]
#[ORM\SequenceGenerator(sequenceName: 'camera.camera_type_id_seq', allocationSize: 1, initialValue: 1)] #[ORM\SequenceGenerator(sequenceName: 'camera.camera_type_id_seq', allocationSize: 1, initialValue: 1)]
private int $id; 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; private string $type;
#[ORM\Column(name: 'description', type: 'text', nullable: true)] #[ORM\Column(name: 'description', type: 'text', nullable: TRUE)]
private ?string $description = null; private ?string $description = NULL;
/** /**
* Value for serialization * Value for serialization

View File

@ -12,48 +12,48 @@ use Doctrine\ORM\Mapping as ORM;
class Film class Film
{ {
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\GeneratedValue(strategy: 'IDENTITY')]
private int $id; private int $id;
#[ORM\Column(name: 'brand', type: 'string', nullable: false)] #[ORM\Column(name: 'brand', type: 'string', nullable: FALSE)]
private string $brand; private string $brand;
#[ORM\Column(name: 'product_line', type: 'string', nullable: true)] #[ORM\Column(name: 'product_line', type: 'string', nullable: TRUE)]
private ?string $productLine = null; 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; private string $filmName;
#[ORM\Column(name: 'film_alias', type: 'string', nullable: true)] #[ORM\Column(name: 'film_alias', type: 'string', nullable: TRUE)]
private ?string $filmAlias = null; 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; 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; private int $filmSpeedDin;
#[ORM\Column(name: 'film_format', type: 'string', nullable: false)] #[ORM\Column(name: 'film_format', type: 'string', nullable: FALSE)]
private string $filmFormat; 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'; 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; 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; 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; 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'; private string $chemistry = 'C-41';
#[ORM\Column(name: 'notes', type: 'text', nullable: true)] #[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)]
private ?string $notes = null; private ?string $notes = NULL;
public function getId(): int public function getId(): int
{ {

View File

@ -13,15 +13,15 @@ class Flash
{ {
use FlashTrait; use FlashTrait;
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\GeneratedValue(strategy: 'IDENTITY')]
#[ORM\SequenceGenerator(sequenceName: 'camera.flash_id_seq', allocationSize: 1, initialValue: 1)] #[ORM\SequenceGenerator(sequenceName: 'camera.flash_id_seq', allocationSize: 1, initialValue: 1)]
private int $id; private int $id;
#[ORM\Column(name: 'received', type: 'boolean', nullable: false, options: ['default' => false])] #[ORM\Column(name: 'received', type: 'boolean', nullable: FALSE, options: ['default' => FALSE])]
private bool $received = false; private bool $received = FALSE;
#[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: false, options: ['default' => false])] #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE, options: ['default' => FALSE])]
private bool $formerlyOwned = false; private bool $formerlyOwned = FALSE;
} }

View File

@ -8,37 +8,37 @@ trait FlashTrait
{ {
use PurchasePriceTrait; use PurchasePriceTrait;
#[ORM\Column(name: 'brand', type: 'string', nullable: false)] #[ORM\Column(name: 'brand', type: 'string', nullable: FALSE)]
private readonly string $brand; private readonly string $brand;
#[ORM\Column(name: 'model', type: 'string', nullable: false)] #[ORM\Column(name: 'model', type: 'string', nullable: FALSE)]
private readonly string $model; private readonly string $model;
#[ORM\Column(name: 'is_auto_flash', type: 'boolean', nullable: false)] #[ORM\Column(name: 'is_auto_flash', type: 'boolean', nullable: FALSE)]
private bool $isAutoFlash = false; private bool $isAutoFlash = FALSE;
#[ORM\Column(name: 'is_ttl', type: 'boolean', nullable: false)] #[ORM\Column(name: 'is_ttl', type: 'boolean', nullable: FALSE)]
private bool $isTtl = 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'; private string $ttlType = 'N / A';
#[ORM\Column(name: 'is_p_ttl', type: 'boolean', nullable: false)] #[ORM\Column(name: 'is_p_ttl', type: 'boolean', nullable: FALSE)]
private bool $isPTtl = 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'; 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 = ''; private ?string $guideNumber = '';
#[ORM\Column(name: 'batteries', type: 'string', nullable: false)] #[ORM\Column(name: 'batteries', type: 'string', nullable: FALSE)]
private string $batteries = '4x AA'; 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; private readonly ?string $notes;
#[ORM\Column(name: 'serial', type: 'string', nullable: true)] #[ORM\Column(name: 'serial', type: 'string', nullable: TRUE)]
private readonly ?string $serial; private readonly ?string $serial;
public function getId(): int public function getId(): int

View File

@ -8,58 +8,58 @@ trait LensTrait
{ {
use PurchasePriceTrait; 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; 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; 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; 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; 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; 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; 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; 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; 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; private readonly ?string $serial;
#[ORM\Column(name: 'notes', type: 'text', nullable: true)] #[ORM\Column(name: 'notes', type: 'text', nullable: TRUE)]
private readonly ?string $notes; 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'; 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; 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; 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; private readonly ?string $rearFilterSize;
#[ORM\Column(name: 'is_teleconverter', type: 'boolean', nullable: false)] #[ORM\Column(name: 'is_teleconverter', type: 'boolean', nullable: FALSE)]
private bool $isTeleconverter = 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; 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; 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; private readonly ?int $apertureBlades;
/** /**

View File

@ -14,15 +14,15 @@ class Lenses
{ {
use LensTrait; use LensTrait;
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\GeneratedValue(strategy: 'IDENTITY')]
#[ORM\SequenceGenerator(sequenceName: 'camera.lenses_id_seq', allocationSize: 1, initialValue: 1)] #[ORM\SequenceGenerator(sequenceName: 'camera.lenses_id_seq', allocationSize: 1, initialValue: 1)]
private int $id; private int $id;
#[ORM\Column(name: 'received', type: 'boolean', nullable: false)] #[ORM\Column(name: 'received', type: 'boolean', nullable: FALSE)]
private bool $received = false; private bool $received = FALSE;
#[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: false)] #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE)]
private bool $formerlyOwned = false; private bool $formerlyOwned = FALSE;
} }

View File

@ -15,7 +15,7 @@ class PreviouslyOwnedCamera
{ {
use CameraTrait; use CameraTrait;
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\GeneratedValue(strategy: 'IDENTITY')]
#[ORM\SequenceGenerator(sequenceName: 'prevously_owned_camera_id_seq', allocationSize: 1, initialValue: 1)] #[ORM\SequenceGenerator(sequenceName: 'prevously_owned_camera_id_seq', allocationSize: 1, initialValue: 1)]

View File

@ -13,14 +13,14 @@ class PreviouslyOwnedFlash
{ {
use FlashTrait; use FlashTrait;
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\GeneratedValue(strategy: 'IDENTITY')]
private int $id; private int $id;
#[ORM\Column(name: 'received', type: 'boolean', nullable: false, options: ['default' => true])] #[ORM\Column(name: 'received', type: 'boolean', nullable: FALSE, options: ['default' => TRUE])]
private bool $received = true; private bool $received = TRUE;
#[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: false, options: ['default' => true])] #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE, options: ['default' => TRUE])]
private bool $formerlyOwned = true; private bool $formerlyOwned = TRUE;
} }

View File

@ -14,14 +14,14 @@ class PreviouslyOwnedLenses
{ {
use LensTrait; use LensTrait;
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] #[ORM\Column(name: 'id', type: 'integer', nullable: FALSE)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'IDENTITY')] #[ORM\GeneratedValue(strategy: 'IDENTITY')]
private int $id; private int $id;
#[ORM\Column(name: 'received', type: 'boolean', nullable: false)] #[ORM\Column(name: 'received', type: 'boolean', nullable: FALSE)]
private bool $received = true; private bool $received = TRUE;
#[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: false)] #[ORM\Column(name: 'formerly_owned', type: 'boolean', nullable: FALSE)]
private bool $formerlyOwned = true; private bool $formerlyOwned = TRUE;
} }

View File

@ -6,8 +6,8 @@ use Doctrine\ORM\Mapping as ORM;
trait PurchasePriceTrait trait PurchasePriceTrait
{ {
#[ORM\Column(name: 'purchase_price', type: 'money', nullable: true)] #[ORM\Column(name: 'purchase_price', type: 'money', nullable: TRUE)]
private ?string $purchasePrice = null; private ?string $purchasePrice = NULL;
public function setPurchasePrice(?string $purchasePrice): self public function setPurchasePrice(?string $purchasePrice): self
{ {

View File

@ -3,10 +3,8 @@
namespace App\Form; namespace App\Form;
use App\Entity\Camera; use App\Entity\Camera;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\{ChoiceType, MoneyType};
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\{AbstractType, FormBuilderInterface};
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\Exception\AccessException;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@ -3,8 +3,7 @@
namespace App\Form; namespace App\Form;
use App\Entity\CameraType; use App\Entity\CameraType;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\{AbstractType, FormBuilderInterface};
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\Exception\AccessException;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@ -3,9 +3,8 @@
namespace App\Form; namespace App\Form;
use App\Entity\Film; use App\Entity\Film;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\{AbstractType, FormBuilderInterface};
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
class FilmType extends AbstractType class FilmType extends AbstractType

View File

@ -3,8 +3,7 @@
namespace App\Form; namespace App\Form;
use App\Entity\Flash; use App\Entity\Flash;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\{AbstractType, FormBuilderInterface};
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\Exception\AccessException;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@ -3,9 +3,8 @@
namespace App\Form; namespace App\Form;
use App\Entity\Lenses; use App\Entity\Lenses;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; 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\Exception\AccessException;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@ -3,8 +3,7 @@
namespace App\Form; namespace App\Form;
use App\Entity\PreviouslyOwnedCamera; use App\Entity\PreviouslyOwnedCamera;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\{AbstractType, FormBuilderInterface};
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\Exception\AccessException;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@ -3,8 +3,7 @@
namespace App\Form; namespace App\Form;
use App\Entity\PreviouslyOwnedFlash; use App\Entity\PreviouslyOwnedFlash;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\{AbstractType, FormBuilderInterface};
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\Exception\AccessException;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@ -3,8 +3,7 @@
namespace App\Form; namespace App\Form;
use App\Entity\PreviouslyOwnedLenses; use App\Entity\PreviouslyOwnedLenses;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\{AbstractType, FormBuilderInterface};
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\Exception\AccessException; use Symfony\Component\OptionsResolver\Exception\AccessException;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;

View File

@ -25,8 +25,8 @@ trait AcquireTrait
$propertyName = $property->getName(); $propertyName = $property->getName();
if ($new->hasProperty($propertyName)) { if ($new->hasProperty($propertyName)) {
$newProperty = $new->getProperty($propertyName); $newProperty = $new->getProperty($propertyName);
$newProperty->setAccessible(true); $newProperty->setAccessible(TRUE);
$property->setAccessible(true); $property->setAccessible(TRUE);
$newProperty->setValue($newRecord, $property->getValue($currentRecord)); $newProperty->setValue($newRecord, $property->getValue($currentRecord));
} }
} }

View File

@ -2,10 +2,8 @@
namespace App\Repository; namespace App\Repository;
use App\Entity\Camera; use App\Entity\{Camera, PreviouslyOwnedCamera};
use App\Entity\PreviouslyOwnedCamera; use Doctrine\ORM\{EntityRepository, ORMInvalidArgumentException};
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\ORMInvalidArgumentException;
class CameraRepository extends EntityRepository class CameraRepository extends EntityRepository
{ {
@ -16,8 +14,8 @@ class CameraRepository extends EntityRepository
*/ */
public function deacquire(Camera $currentRecord): void public function deacquire(Camera $currentRecord): void
{ {
$currentRecord->setFormerlyOwned(true) $currentRecord->setFormerlyOwned(TRUE)
->setReceived(true); ->setReceived(TRUE);
$this->moveRecord($currentRecord, new PreviouslyOwnedCamera()); $this->moveRecord($currentRecord, new PreviouslyOwnedCamera());
} }
@ -27,7 +25,7 @@ class CameraRepository extends EntityRepository
*/ */
public function reacquire(PreviouslyOwnedCamera $currentRecord): void public function reacquire(PreviouslyOwnedCamera $currentRecord): void
{ {
$currentRecord->setFormerlyOwned(false); $currentRecord->setFormerlyOwned(FALSE);
$this->moveRecord($currentRecord, new Camera()); $this->moveRecord($currentRecord, new Camera());
} }

View File

@ -2,10 +2,8 @@
namespace App\Repository; namespace App\Repository;
use App\Entity\Flash; use App\Entity\{Flash, PreviouslyOwnedFlash};
use App\Entity\PreviouslyOwnedFlash; use Doctrine\ORM\{EntityRepository, ORMInvalidArgumentException};
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\ORMInvalidArgumentException;
class FlashRepository extends EntityRepository class FlashRepository extends EntityRepository
{ {
@ -16,8 +14,8 @@ class FlashRepository extends EntityRepository
*/ */
public function deacquire(Flash $currentRecord): void public function deacquire(Flash $currentRecord): void
{ {
$currentRecord->setFormerlyOwned(true) $currentRecord->setFormerlyOwned(TRUE)
->setReceived(true); ->setReceived(TRUE);
$this->moveRecord($currentRecord, new PreviouslyOwnedFlash()); $this->moveRecord($currentRecord, new PreviouslyOwnedFlash());
} }
@ -27,7 +25,7 @@ class FlashRepository extends EntityRepository
*/ */
public function reacquire(PreviouslyOwnedFlash $currentRecord): void public function reacquire(PreviouslyOwnedFlash $currentRecord): void
{ {
$currentRecord->setFormerlyOwned(false); $currentRecord->setFormerlyOwned(FALSE);
$this->moveRecord($currentRecord, new Flash()); $this->moveRecord($currentRecord, new Flash());
} }

View File

@ -2,8 +2,7 @@
namespace App\Repository; namespace App\Repository;
use App\Entity\Lenses; use App\Entity\{Lenses, PreviouslyOwnedLenses};
use App\Entity\PreviouslyOwnedLenses;
use Doctrine\ORM\EntityRepository; use Doctrine\ORM\EntityRepository;
class LensesRepository extends EntityRepository class LensesRepository extends EntityRepository
@ -12,15 +11,15 @@ class LensesRepository extends EntityRepository
public function deacquire(Lenses $currentRecord): void public function deacquire(Lenses $currentRecord): void
{ {
$currentRecord->setFormerlyOwned(true) $currentRecord->setFormerlyOwned(TRUE)
->setReceived(true); ->setReceived(TRUE);
$this->moveRecord($currentRecord, new PreviouslyOwnedLenses()); $this->moveRecord($currentRecord, new PreviouslyOwnedLenses());
} }
public function reacquire(PreviouslyOwnedLenses $currentRecord): void public function reacquire(PreviouslyOwnedLenses $currentRecord): void
{ {
$currentRecord->setFormerlyOwned(false); $currentRecord->setFormerlyOwned(FALSE);
$this->moveRecord($currentRecord, new Lenses()); $this->moveRecord($currentRecord, new Lenses());
} }

View File

@ -26,6 +26,6 @@ class MoneyType extends Type
public function requiresSQLCommentHint(AbstractPlatform $platform): bool public function requiresSQLCommentHint(AbstractPlatform $platform): bool
{ {
return true; return TRUE;
} }
} }

View File

@ -14,6 +14,6 @@ return static function (ContainerConfigurator $config): void {
DeclareStrictTypesFixer::class, DeclareStrictTypesFixer::class,
]); ]);
$parameters->set(Option::PARALLEL, true); $parameters->set(Option::PARALLEL, TRUE);
$parameters->set(Option::PATHS, [__DIR__ . '/../src', __DIR__]); $parameters->set(Option::PATHS, [__DIR__ . '/../src', __DIR__]);
}; };

View File

@ -2,42 +2,28 @@
use Rector\CodeQuality\Rector\BooleanNot\SimplifyDeMorganBinaryRector; use Rector\CodeQuality\Rector\BooleanNot\SimplifyDeMorganBinaryRector;
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
use Rector\CodeQuality\Rector\For_\ForRepeatedCountToOwnVariableRector; use Rector\CodeQuality\Rector\For_\{ForRepeatedCountToOwnVariableRector, ForToForeachRector};
use Rector\CodeQuality\Rector\For_\ForToForeachRector; use Rector\CodeQuality\Rector\If_\{ConsecutiveNullCompareReturnsToNullCoalesceQueueRector, SimplifyIfElseToTernaryRector, SimplifyIfReturnBoolRector};
use Rector\CodeQuality\Rector\If_\ConsecutiveNullCompareReturnsToNullCoalesceQueueRector; use Rector\CodeQuality\Rector\Ternary\{SimplifyDuplicatedTernaryRector, SimplifyTautologyTernaryRector, SwitchNegatedTernaryRector};
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\CodingStyle\Rector\Class_\AddArrayDefaultToArrayPropertyRector; use Rector\CodingStyle\Rector\Class_\AddArrayDefaultToArrayPropertyRector;
use Rector\CodingStyle\Rector\ClassConst\RemoveFinalFromConstRector; use Rector\CodingStyle\Rector\ClassConst\RemoveFinalFromConstRector;
use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector; use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector;
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector; use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
use Rector\CodingStyle\Rector\FuncCall\CallUserFuncArrayToVariadicRector; use Rector\CodingStyle\Rector\FuncCall\{CallUserFuncArrayToVariadicRector, CallUserFuncToMethodCallRector, CountArrayToEmptyArrayComparisonRector};
use Rector\CodingStyle\Rector\FuncCall\CallUserFuncToMethodCallRector;
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector; use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Rector\Core\Configuration\Option; use Rector\Core\Configuration\Option;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector; use Rector\DeadCode\Rector\ClassMethod\{RemoveUselessParamTagRector, RemoveUselessReturnTagRector};
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
use Rector\DeadCode\Rector\Foreach_\RemoveUnusedForeachKeyRector; use Rector\DeadCode\Rector\Foreach_\RemoveUnusedForeachKeyRector;
use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector; use Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector;
use Rector\DeadCode\Rector\Switch_\RemoveDuplicatedCaseInSwitchRector; use Rector\DeadCode\Rector\Switch_\RemoveDuplicatedCaseInSwitchRector;
use Rector\Doctrine\Set\DoctrineSetList; use Rector\Doctrine\Set\DoctrineSetList;
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector; use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector; use Rector\EarlyReturn\Rector\If_\{ChangeIfElseValueAssignToEarlyReturnRector, RemoveAlwaysElseRector};
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector; use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Restoration\Rector\Property\MakeTypedPropertyNullableIfCheckedRector; use Rector\Restoration\Rector\Property\MakeTypedPropertyNullableIfCheckedRector;
use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\LevelSetList;
use Rector\Symfony\Set\SymfonyLevelSetList; use Rector\Symfony\Set\{SymfonyLevelSetList, SymfonySetList};
use Rector\Symfony\Set\SymfonySetList; use Rector\TypeDeclaration\Rector\ClassMethod\{AddArrayParamDocTypeRector, AddArrayReturnDocTypeRector, AddMethodCallBasedStrictParamTypeRector, ParamTypeByMethodCallTypeRector, ParamTypeByParentCallTypeRector};
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\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector; use Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector; use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
@ -46,8 +32,8 @@ require_once __DIR__ . '/common.inc.php';
return static function (ContainerConfigurator $config): void { return static function (ContainerConfigurator $config): void {
$parameters = $config->parameters(); $parameters = $config->parameters();
$parameters->set(Option::AUTO_IMPORT_NAMES, true); $parameters->set(Option::AUTO_IMPORT_NAMES, TRUE);
$parameters->set(Option::IMPORT_SHORT_CLASSES, true); $parameters->set(Option::IMPORT_SHORT_CLASSES, TRUE);
$parameters->set(Option::SKIP, [ $parameters->set(Option::SKIP, [
ReadOnlyPropertyRector::class, ReadOnlyPropertyRector::class,
]); ]);

View File

@ -1,68 +1,68 @@
<?php declare(strict_types=1); <?php declare(strict_types=1);
return [ return [
'' => '', '' => '',
'4x4' => '4x4cm', '4x4' => '4x4cm',
'6x4.5' => '6x4.5cm', '6x4.5' => '6x4.5cm',
'6x6' => '6x6cm', '6x6' => '6x6cm',
'35mm' => '35mm', '35mm' => '35mm',
'110' => '110', '110' => '110',
'120' => '120', '120' => '120',
'127' => '127', '127' => '127',
'620' => '620', '620' => '620',
'Aperture blades' => '# of Aperture Blades', 'Aperture blades' => '# of Aperture Blades',
'APS-C' => 'APS-C', 'APS-C' => 'APS-C',
'B & W' => 'B & W', 'B & W' => 'B & W',
'Batteries' => 'Batteries', 'Batteries' => 'Batteries',
'Battery type' => 'Battery Type', 'Battery type' => 'Battery Type',
'Brand' => 'Brand', 'Brand' => 'Brand',
'C-41' => 'C-41', 'C-41' => 'C-41',
'Cellulose Triacetate' => 'Cellulose Triacetate', 'Cellulose Triacetate' => 'Cellulose Triacetate',
'Chemistry' => 'Film Chemistry', 'Chemistry' => 'Film Chemistry',
'Coatings' => 'Coatings', 'Coatings' => 'Coatings',
'Crop factor' => 'Crop Factor', 'Crop factor' => 'Crop Factor',
'Description' => 'Description', 'Description' => 'Description',
'Design elements' => '# of Design Elements', 'Design elements' => '# of Design Elements',
'Design groups' => '# of Design Groups', 'Design groups' => '# of Design Groups',
'Developed rolls' => '# of Developed Rolls', 'Developed rolls' => '# of Developed Rolls',
'E-6' => 'E-6', 'E-6' => 'E-6',
'Film alias' => 'Film Alias', 'Film alias' => 'Film Alias',
'Film base' => 'Film Base', 'Film base' => 'Film Base',
'Film format' => 'Film Format', 'Film format' => 'Film Format',
'Film name' => 'Film Name', 'Film name' => 'Film Name',
'Film speed asa' => 'Film Speed (ASA)', 'Film speed asa' => 'Film Speed (ASA)',
'Film speed din' => 'Film Speed (DIN)', 'Film speed din' => 'Film Speed (DIN)',
'Formerly owned' => 'Formerly Owned', 'Formerly owned' => 'Formerly Owned',
'Front filter size' => 'Front filter size (mm)', 'Front filter size' => 'Front filter size (mm)',
'Guide number' => 'Guide Number', 'Guide number' => 'Guide Number',
'Image size' => 'Image Size', 'Image size' => 'Image Size',
'Is auto flash' => 'Is auto flash', 'Is auto flash' => 'Is auto flash',
'Is digital' => 'Is Digital', 'Is digital' => 'Is Digital',
'Is p ttl' => 'Is P-TTL', 'Is p ttl' => 'Is P-TTL',
'Is teleconverter' => 'Is teleconverter', 'Is teleconverter' => 'Is teleconverter',
'Is ttl' => 'Is TTL', 'Is ttl' => 'Is TTL',
'Is working' => 'Is Working', 'Is working' => 'Is Working',
'Max f stop' => 'Max aperture (smallest f number)', 'Max f stop' => 'Max aperture (smallest f number)',
'Max focal length' => 'Max focal length (mm)', 'Max focal length' => 'Max focal length (mm)',
'Medium Format' => 'Medium Format', 'Medium Format' => 'Medium Format',
'Micro 4/3' => 'μ 4/3', 'Micro 4/3' => 'μ 4/3',
'Min f stop' => 'Min aperture (largest f number)', 'Min f stop' => 'Min aperture (largest f number)',
'Min focal length' => 'Min focal length (mm)', 'Min focal length' => 'Min focal length (mm)',
'Model' => 'Model', 'Model' => 'Model',
'Mount' => 'Mount', 'Mount' => 'Mount',
'Notes' => 'Notes', 'Notes' => 'Notes',
'Other' => 'Other', 'Other' => 'Other',
'P ttl type' => 'P-TTL Type', 'P ttl type' => 'P-TTL Type',
'Polyester' => 'Polyester', 'Polyester' => 'Polyester',
'Polyethylene Naphtalate' => 'Polyethylene Naphtalate', 'Polyethylene Naphtalate' => 'Polyethylene Naphtalate',
'Product line' => 'Product Line', 'Product line' => 'Product Line',
'Purchase price' => 'Purchase Price', 'Purchase price' => 'Purchase Price',
'Rear filter size' => 'Rear filter size (mm)', 'Rear filter size' => 'Rear filter size (mm)',
'Received' => 'Received', 'Received' => 'Received',
'Rolls in camera' => '# of Rolls in a Camera', 'Rolls in camera' => '# of Rolls in a Camera',
'Serial' => 'Serial', 'Serial' => 'Serial',
'Small Format' => 'Small Format', 'Small Format' => 'Small Format',
'Ttl type' => 'TTL Type', 'Ttl type' => 'TTL Type',
'Type' => 'Type', 'Type' => 'Type',
'Unused rolls' => '# of Unused Rolls', 'Unused rolls' => '# of Unused Rolls',
]; ];