mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 03:44:36 +02:00
Applied rector with PHP8.1 migration rules
This commit is contained in:
parent
dc6a67c2f0
commit
7ee01d9a05
303 changed files with 1228 additions and 3465 deletions
|
@ -32,7 +32,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
/**
|
||||
* Class Footprint.
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: 'App\Repository\Parts\FootprintRepository')]
|
||||
#[ORM\Entity(repositoryClass: \App\Repository\Parts\FootprintRepository::class)]
|
||||
#[ORM\Table('`footprints`')]
|
||||
#[ORM\Index(name: 'footprint_idx_name', columns: ['name'])]
|
||||
#[ORM\Index(name: 'footprint_idx_parent_name', columns: ['parent_id', 'name'])]
|
||||
|
@ -40,7 +40,7 @@ class Footprint extends AbstractPartsContainingDBElement
|
|||
{
|
||||
#[ORM\ManyToOne(targetEntity: 'Footprint', inversedBy: 'children')]
|
||||
#[ORM\JoinColumn(name: 'parent_id')]
|
||||
protected ?\App\Entity\Base\AbstractStructuralDBElement $parent;
|
||||
protected ?\App\Entity\Base\AbstractStructuralDBElement $parent = null;
|
||||
|
||||
/**
|
||||
* @var Collection
|
||||
|
@ -53,21 +53,21 @@ class Footprint extends AbstractPartsContainingDBElement
|
|||
* @var Collection<int, FootprintAttachment>
|
||||
*/
|
||||
#[Assert\Valid]
|
||||
#[ORM\OneToMany(targetEntity: 'App\Entity\Attachments\FootprintAttachment', mappedBy: 'element', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OneToMany(targetEntity: \App\Entity\Attachments\FootprintAttachment::class, mappedBy: 'element', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['name' => 'ASC'])]
|
||||
protected Collection $attachments;
|
||||
|
||||
/**
|
||||
* @var FootprintAttachment|null
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: 'App\Entity\Attachments\FootprintAttachment')]
|
||||
#[ORM\ManyToOne(targetEntity: \App\Entity\Attachments\FootprintAttachment::class)]
|
||||
#[ORM\JoinColumn(name: 'id_footprint_3d')]
|
||||
protected ?FootprintAttachment $footprint_3d = null;
|
||||
|
||||
/** @var Collection<int, FootprintParameter>
|
||||
*/
|
||||
#[Assert\Valid]
|
||||
#[ORM\OneToMany(targetEntity: 'App\Entity\Parameters\FootprintParameter', mappedBy: 'element', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OneToMany(targetEntity: \App\Entity\Parameters\FootprintParameter::class, mappedBy: 'element', cascade: ['persist', 'remove'], orphanRemoval: true)]
|
||||
#[ORM\OrderBy(['group' => 'ASC', 'name' => 'ASC'])]
|
||||
protected Collection $parameters;
|
||||
|
||||
|
@ -88,13 +88,10 @@ class Footprint extends AbstractPartsContainingDBElement
|
|||
* Setters
|
||||
*
|
||||
*********************************************************************************/
|
||||
|
||||
/**
|
||||
* Sets the 3D Model associated with this footprint.
|
||||
*
|
||||
* @param FootprintAttachment|null $new_attachment The new 3D Model
|
||||
*
|
||||
* @return Footprint
|
||||
*/
|
||||
public function setFootprint3d(?FootprintAttachment $new_attachment): self
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue