mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-24 02:38:50 +02:00
Fixed PHPstan issues.
This commit is contained in:
parent
93aeeb162d
commit
ea302ded91
12 changed files with 26 additions and 22 deletions
|
@ -56,13 +56,13 @@ class AttachmentType extends AbstractStructuralDBElement
|
|||
*/
|
||||
protected $filetype_filter = '';
|
||||
/**
|
||||
* @var Collection|AttachmentTypeAttachment[]
|
||||
* @var Collection<AttachmentTypeAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\AttachmentTypeAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
/** @var AttachmentTypeParameter[]
|
||||
/** @var Collection<AttachmentTypeParameter>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\AttachmentTypeParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
|
|
|
@ -93,12 +93,12 @@ class Device extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $order_only_missing_parts = false;
|
||||
/**
|
||||
* @var Collection|DeviceAttachment[]
|
||||
* @var Collection<DeviceAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\DeviceAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
/** @var DeviceParameter[]
|
||||
/** @var Collection<DeviceParameter>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\DeviceParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
*/
|
||||
|
|
|
@ -31,7 +31,7 @@ trait ParametersTrait
|
|||
/**
|
||||
* Mapping done in subclasses.
|
||||
*
|
||||
* @var AbstractParameter[]|Collection
|
||||
* @var Collection<AbstractParameter>
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $parameters;
|
||||
|
@ -39,7 +39,7 @@ trait ParametersTrait
|
|||
/**
|
||||
* Return all associated specifications.
|
||||
*
|
||||
* @return AbstractParameter[]|Collection
|
||||
* @return Collection<AbstractParameter>
|
||||
*/
|
||||
public function getParameters(): Collection
|
||||
{
|
||||
|
|
|
@ -107,7 +107,7 @@ class Category extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $attachments;
|
||||
|
||||
/** @var CategoryParameter[]
|
||||
/** @var Collection|CategoryParameter[]
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\CategoryParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
|
|
|
@ -81,7 +81,7 @@ class Footprint extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $parts;
|
||||
/**
|
||||
* @var Collection|FootprintAttachment[]
|
||||
* @var Collection<FootprintAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\FootprintAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
|
@ -94,7 +94,7 @@ class Footprint extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $footprint_3d;
|
||||
|
||||
/** @var FootprintParameter[]
|
||||
/** @var Collection<FootprintParameter>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\FootprintParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})@ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
|
|
|
@ -81,13 +81,13 @@ class Manufacturer extends AbstractCompany
|
|||
*/
|
||||
protected $parts;
|
||||
/**
|
||||
* @var Collection|ManufacturerAttachment[]
|
||||
* @var Collection<ManufacturerAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\ManufacturerAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
/** @var ManufacturerParameter[]
|
||||
/** @var Collection<ManufacturerParameter>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\ManufacturerParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
|
|
|
@ -98,13 +98,13 @@ class MeasurementUnit extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $parts;
|
||||
/**
|
||||
* @var Collection|MeasurementUnitAttachment[]
|
||||
* @var Collection<MeasurementUnitAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\MeasurementUnitAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
/** @var MeasurementUnitParameter[]
|
||||
/** @var Collection<MeasurementUnitParameter>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\MeasurementUnitParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -92,7 +92,7 @@ class Storelocation extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $parts;
|
||||
|
||||
/** @var StorelocationParameter[]
|
||||
/** @var Collection<StorelocationParameter>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\StorelocationParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
|
@ -117,7 +117,7 @@ class Storelocation extends AbstractPartsContainingDBElement
|
|||
*/
|
||||
protected $limit_to_existing_parts = false;
|
||||
/**
|
||||
* @var Collection|StorelocationAttachment[]
|
||||
* @var Collection<StorelocationAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\StorelocationAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
|
|
|
@ -107,14 +107,15 @@ class Supplier extends AbstractCompany
|
|||
* )
|
||||
*/
|
||||
protected $parts;
|
||||
|
||||
/**
|
||||
* @var Collection|SupplierAttachment[]
|
||||
* @var Collection<SupplierAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\SupplierAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
/** @var SupplierParameter[]
|
||||
/** @var Collection<SupplierParameter>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\SupplierParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
|
|
|
@ -88,13 +88,13 @@ class Currency extends AbstractStructuralDBElement
|
|||
protected $parent;
|
||||
|
||||
/**
|
||||
* @var Collection|CurrencyAttachment[]
|
||||
* @var Collection<CurrencyAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\CurrencyAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
protected $attachments;
|
||||
|
||||
/** @var CurrencyParameter[]
|
||||
/** @var Collection<CurrencyParameter>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\CurrencyParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
|
|
|
@ -81,7 +81,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
|
|||
*/
|
||||
protected $enforce2FA = false;
|
||||
/**
|
||||
* @var Collection|GroupAttachment[]
|
||||
* @var Collection<GroupAttachment>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\ManufacturerAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @Assert\Valid()
|
||||
*/
|
||||
|
@ -93,7 +93,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
|
|||
*/
|
||||
protected $permissions;
|
||||
|
||||
/** @var GroupParameter[]
|
||||
/** @var Collection<GroupParameter>
|
||||
* @ORM\OneToMany(targetEntity="App\Entity\Parameters\GroupParameter", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
|
||||
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
|
||||
* @Assert\Valid()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue