diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php index 73fc45bbe..d3c18fe64 100644 --- a/src/Bundle/ChillMainBundle/Entity/User.php +++ b/src/Bundle/ChillMainBundle/Entity/User.php @@ -33,22 +33,18 @@ use function in_array; class User implements AdvancedUserInterface { /** - * @var int - * * @ORM\Id * @ORM\Column(name="id", type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ - protected $id; + protected ?int $id = null; /** * Array where SAML attributes's data are stored. * - * @var array - * * @ORM\Column(type="json", nullable=true) */ - private $attributes; + private array $attributes; /** * @ORM\ManyToOne(targetEntity=Location::class) @@ -64,32 +60,26 @@ class User implements AdvancedUserInterface private ?string $email = null; /** - * @var string - * * @ORM\Column( * type="string", * length=150, * nullable=true, * unique=true) */ - private $emailCanonical; + private ?string $emailCanonical = null; /** - * @var bool - * * @ORM\Column(type="boolean") */ - private $enabled = true; + private bool $enabled = true; /** - * @var Collection - * * @ORM\ManyToMany( * targetEntity="Chill\MainBundle\Entity\GroupCenter", * inversedBy="users") * @ORM\Cache(usage="NONSTRICT_READ_WRITE") */ - private $groupCenters; + private Collection $groupCenters; /** * @ORM\Column(type="string", length=200) @@ -98,12 +88,10 @@ class User implements AdvancedUserInterface private string $label = ''; /** - * @var bool - * * @ORM\Column(type="boolean") * sf4 check: in yml was false by default !? */ - private $locked = true; + private bool $locked = true; /** * @ORM\ManyToOne(targetEntity=Center::class) @@ -117,20 +105,16 @@ class User implements AdvancedUserInterface private ?Scope $mainScope = null; /** - * @var string - * * @ORM\Column(type="string", length=255) */ - private $password; + private string $password = ''; /** - * @var string - * * @internal must be set to null if we use bcrypt * * @ORM\Column(type="string", length=255, nullable=true) */ - private $salt; + private ?string $salt = null; /** * @ORM\ManyToOne(targetEntity=UserJob::class) @@ -138,22 +122,18 @@ class User implements AdvancedUserInterface private ?UserJob $userJob = null; /** - * @var string - * * @ORM\Column(type="string", length=80) */ - private $username; + private string $username = ''; /** - * @var string - * * @ORM\Column( * type="string", * length=80, * unique=true, * nullable=true) */ - private $usernameCanonical; + private ?string $usernameCanonical = null; /** * User constructor.