Improved typing of properties

This commit is contained in:
Jan Böhmer 2023-04-15 22:25:03 +02:00
parent 29d1d49aca
commit 13209c3236
30 changed files with 78 additions and 61 deletions

View file

@ -22,6 +22,7 @@ declare(strict_types=1);
namespace App\Entity\Base;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
@ -33,5 +34,5 @@ use Symfony\Component\Serializer\Annotation\Groups;
abstract class AbstractPartsContainingDBElement extends AbstractStructuralDBElement
{
/** @Groups({"full"}) */
protected $parameters;
protected Collection $parameters;
}

View file

@ -87,7 +87,7 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
* @var AbstractStructuralDBElement[]|Collection
* @Groups({"include_children"})
*/
protected $children;
protected Collection $children;
/**
* @var AbstractStructuralDBElement
@ -106,6 +106,7 @@ abstract class AbstractStructuralDBElement extends AttachmentContainingDBElement
parent::__construct();
$this->children = new ArrayCollection();
$this->parameters = new ArrayCollection();
$this->parent = null;
}
public function __clone()