Fixed some more inspection issues

This commit is contained in:
Jan Böhmer 2023-04-15 22:05:29 +02:00
parent de96aae9a5
commit 29d1d49aca
83 changed files with 153 additions and 172 deletions

View file

@ -55,7 +55,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
* @ORM\ManyToOne(targetEntity="Group", inversedBy="children")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id")
*/
protected $parent;
protected ?AbstractStructuralDBElement $parent;
/**
* @ORM\OneToMany(targetEntity="User", mappedBy="group")
@ -68,7 +68,7 @@ class Group extends AbstractStructuralDBElement implements HasPermissionsInterfa
* @ORM\Column(type="boolean", name="enforce_2fa")
* @Groups({"extended", "full", "import"})
*/
protected $enforce2FA = false;
protected bool $enforce2FA = false;
/**
* @var Collection<int, GroupAttachment>
* @ORM\OneToMany(targetEntity="App\Entity\Attachments\GroupAttachment", mappedBy="element", cascade={"persist", "remove"}, orphanRemoval=true)

View file

@ -216,7 +216,7 @@ final class PermissionData implements \JsonSerializable
continue;
}
$ret[$permission] = array_filter($operations, function ($value) {
$ret[$permission] = array_filter($operations, static function ($value) {
return $value !== null;
});

View file

@ -255,10 +255,10 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
* @Selectable()
* @Groups({"extended", "full", "import"})
*/
protected $currency;
protected ?Currency $currency;
/**
* @var PermissionData
* @var PermissionData|null
* @ValidPermission()
* @ORM\Embedded(class="PermissionData", columnPrefix="permissions_")
* @Groups({"simple", "extended", "full", "import"})
@ -266,10 +266,10 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
protected ?PermissionData $permissions = null;
/**
* @var DateTime the time until the password reset token is valid
* @var DateTime|null the time until the password reset token is valid
* @ORM\Column(type="datetime", nullable=true, options={"default": null})
*/
protected $pw_reset_expires;
protected ?DateTime $pw_reset_expires;
/**
* @var bool True if the user was created by a SAML provider (and therefore cannot change its password)