mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-30 06:39:40 +02:00
Applied rector suggestions
This commit is contained in:
parent
4106bcef5f
commit
20f32c7f12
170 changed files with 808 additions and 761 deletions
|
@ -22,6 +22,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\PriceInformations;
|
||||
|
||||
use Doctrine\Common\Collections\Criteria;
|
||||
use ApiPlatform\Doctrine\Common\Filter\DateFilterInterface;
|
||||
use ApiPlatform\Doctrine\Orm\Filter\DateFilter;
|
||||
use ApiPlatform\Doctrine\Orm\Filter\OrderFilter;
|
||||
|
@ -118,7 +119,7 @@ class Currency extends AbstractStructuralDBElement
|
|||
protected string $iso_code = "";
|
||||
|
||||
#[ORM\OneToMany(mappedBy: 'parent', targetEntity: self::class, cascade: ['persist'])]
|
||||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
#[ORM\OrderBy(['name' => Criteria::ASC])]
|
||||
protected Collection $children;
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'children')]
|
||||
|
@ -132,7 +133,7 @@ class Currency extends AbstractStructuralDBElement
|
|||
*/
|
||||
#[Assert\Valid]
|
||||
#[ORM\OneToMany(mappedBy: 'element', targetEntity: CurrencyAttachment::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
#[ORM\OrderBy(['name' => Criteria::ASC])]
|
||||
#[Groups(['currency:read', 'currency:write'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
|
@ -145,7 +146,7 @@ class Currency extends AbstractStructuralDBElement
|
|||
*/
|
||||
#[Assert\Valid]
|
||||
#[ORM\OneToMany(mappedBy: 'element', targetEntity: CurrencyParameter::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['group' => 'ASC', 'name' => 'ASC'])]
|
||||
#[ORM\OrderBy(['group' => Criteria::ASC, 'name' => 'ASC'])]
|
||||
#[Groups(['currency:read', 'currency:write'])]
|
||||
protected Collection $parameters;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace App\Entity\PriceInformations;
|
||||
|
||||
use Doctrine\Common\Collections\Criteria;
|
||||
use ApiPlatform\Doctrine\Common\Filter\DateFilterInterface;
|
||||
use ApiPlatform\Doctrine\Orm\Filter\BooleanFilter;
|
||||
use ApiPlatform\Doctrine\Orm\Filter\DateFilter;
|
||||
|
@ -96,10 +97,13 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N
|
|||
{
|
||||
use TimestampTrait;
|
||||
|
||||
/**
|
||||
* @var Collection<int, Pricedetail>
|
||||
*/
|
||||
#[Assert\Valid]
|
||||
#[Groups(['extended', 'full', 'import', 'orderdetail:read', 'orderdetail:write'])]
|
||||
#[ORM\OneToMany(mappedBy: 'orderdetail', targetEntity: Pricedetail::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['min_discount_quantity' => 'ASC'])]
|
||||
#[ORM\OrderBy(['min_discount_quantity' => Criteria::ASC])]
|
||||
protected Collection $pricedetails;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue