mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-12 11:24:31 +02:00
Fixed PHPstan issues.
This commit is contained in:
parent
93aeeb162d
commit
ea302ded91
12 changed files with 26 additions and 22 deletions
|
@ -52,6 +52,7 @@ namespace App\Entity\Parts;
|
|||
|
||||
use App\Entity\Attachments\Attachment;
|
||||
use App\Entity\Attachments\AttachmentContainingDBElement;
|
||||
use App\Entity\Attachments\PartAttachment;
|
||||
use App\Entity\Devices\Device;
|
||||
use App\Entity\Parameters\ParametersTrait;
|
||||
use App\Entity\Parameters\PartParameter;
|
||||
|
@ -63,6 +64,7 @@ use App\Entity\Parts\PartTraits\OrderTrait;
|
|||
use App\Security\Annotations\ColumnSecurity;
|
||||
use DateTime;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
|
@ -90,7 +92,7 @@ class Part extends AttachmentContainingDBElement
|
|||
*/
|
||||
protected $devices = [];
|
||||
|
||||
/** @var PartParameter[]
|
||||
/** @var Collection<PartParameter>
|
||||
* @Assert\Valid()
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\PartParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
|
@ -117,6 +119,7 @@ class Part extends AttachmentContainingDBElement
|
|||
protected $name = '';
|
||||
|
||||
/**
|
||||
* @var Collection<PartAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\PartAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ColumnSecurity(type="collection", prefix="attachments")
|
||||
* @Assert\Valid()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue