Fixed some PHPStan level 5 issues

This commit is contained in:
Jan Böhmer 2023-06-13 20:24:54 +02:00
parent 74051c5649
commit 19530a9102
35 changed files with 95 additions and 63 deletions

View file

@ -66,11 +66,11 @@ class Currency extends AbstractStructuralDBElement
#[ORM\Column(type: Types::STRING)]
protected string $iso_code = "";
#[ORM\OneToMany(targetEntity: 'Currency', mappedBy: 'parent', cascade: ['persist'])]
#[ORM\OneToMany(targetEntity: self::class, mappedBy: 'parent', cascade: ['persist'])]
#[ORM\OrderBy(['name' => 'ASC'])]
protected Collection $children;
#[ORM\ManyToOne(targetEntity: 'Currency', inversedBy: 'children')]
#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'children')]
#[ORM\JoinColumn(name: 'parent_id')]
protected ?AbstractStructuralDBElement $parent = null;

View file

@ -52,7 +52,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
#[Assert\Valid]
#[Groups(['extended', 'full', 'import'])]
#[ORM\OneToMany(targetEntity: 'Pricedetail', mappedBy: 'orderdetail', cascade: ['persist', 'remove'], orphanRemoval: true)]
#[ORM\OneToMany(targetEntity: Pricedetail::class, mappedBy: 'orderdetail', cascade: ['persist', 'remove'], orphanRemoval: true)]
#[ORM\OrderBy(['min_discount_quantity' => 'ASC'])]
protected Collection $pricedetails;

View file

@ -64,7 +64,7 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
* If this is null, the global base unit is assumed
*/
#[Groups(['extended', 'full', 'import'])]
#[ORM\ManyToOne(targetEntity: 'Currency', inversedBy: 'pricedetails')]
#[ORM\ManyToOne(targetEntity: Currency::class, inversedBy: 'pricedetails')]
#[ORM\JoinColumn(name: 'id_currency')]
#[Selectable()]
protected ?Currency $currency = null;
@ -95,7 +95,7 @@ class Pricedetail extends AbstractDBElement implements TimeStampableInterface
* @var Orderdetail|null
*/
#[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: 'Orderdetail', inversedBy: 'pricedetails')]
#[ORM\ManyToOne(targetEntity: Orderdetail::class, inversedBy: 'pricedetails')]
#[ORM\JoinColumn(name: 'orderdetails_id', nullable: false, onDelete: 'CASCADE')]
protected ?Orderdetail $orderdetail = null;