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

@ -49,7 +49,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
* @ORM\OrderBy({"name" = "ASC"})
* @var Collection
*/
protected $children;
protected Collection $children;
/**
* @ORM\ManyToOne(targetEntity="Group", inversedBy="children")
@ -61,7 +61,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
* @ORM\OneToMany(targetEntity="User", mappedBy="group")
* @var Collection<User>
*/
protected $users;
protected Collection $users;
/**
* @var bool If true all users associated with this group must have enabled some kind of 2 factor authentication
@ -75,7 +75,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
* @ORM\OrderBy({"name" = "ASC"})
* @Assert\Valid()
*/
protected $attachments;
protected Collection $attachments;
/**
* @var PermissionData|null
@ -90,7 +90,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
* @ORM\OrderBy({"group" = "ASC" ,"name" = "ASC"})
* @Assert\Valid()
*/
protected $parameters;
protected Collection $parameters;
public function __construct()
{

View file

@ -226,7 +226,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\UserAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)
* @ORM\OrderBy({"name" = "ASC"})
*/
protected $attachments;
protected Collection $attachments;
/** @var DateTime|null The time when the backup codes were generated
* @ORM\Column(type="datetime", nullable=true)
@ -237,13 +237,13 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
/** @var Collection<int, LegacyU2FKeyInterface>
* @ORM\OneToMany(targetEntity="App\Entity\UserSystem\U2FKey", mappedBy="user", cascade={"REMOVE"}, orphanRemoval=true)
*/
protected $u2fKeys;
protected Collection $u2fKeys;
/**
* @var Collection<int, WebauthnKey>
* @ORM\OneToMany(targetEntity="App\Entity\UserSystem\WebauthnKey", mappedBy="user", cascade={"REMOVE"}, orphanRemoval=true)
*/
protected $webauthn_keys;
protected Collection $webauthn_keys;
/**
* @var Currency|null The currency the user wants to see prices in.