mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
type hint User class
This commit is contained in:
parent
3d8d79323e
commit
79fbdcdee4
@ -33,22 +33,18 @@ use function in_array;
|
|||||||
class User implements AdvancedUserInterface
|
class User implements AdvancedUserInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var int
|
|
||||||
*
|
|
||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\Column(name="id", type="integer")
|
* @ORM\Column(name="id", type="integer")
|
||||||
* @ORM\GeneratedValue(strategy="AUTO")
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
*/
|
*/
|
||||||
protected $id;
|
protected ?int $id = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array where SAML attributes's data are stored.
|
* Array where SAML attributes's data are stored.
|
||||||
*
|
*
|
||||||
* @var array
|
|
||||||
*
|
|
||||||
* @ORM\Column(type="json", nullable=true)
|
* @ORM\Column(type="json", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $attributes;
|
private array $attributes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity=Location::class)
|
* @ORM\ManyToOne(targetEntity=Location::class)
|
||||||
@ -64,32 +60,26 @@ class User implements AdvancedUserInterface
|
|||||||
private ?string $email = null;
|
private ?string $email = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @ORM\Column(
|
* @ORM\Column(
|
||||||
* type="string",
|
* type="string",
|
||||||
* length=150,
|
* length=150,
|
||||||
* nullable=true,
|
* nullable=true,
|
||||||
* unique=true)
|
* unique=true)
|
||||||
*/
|
*/
|
||||||
private $emailCanonical;
|
private ?string $emailCanonical = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var bool
|
|
||||||
*
|
|
||||||
* @ORM\Column(type="boolean")
|
* @ORM\Column(type="boolean")
|
||||||
*/
|
*/
|
||||||
private $enabled = true;
|
private bool $enabled = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Collection
|
|
||||||
*
|
|
||||||
* @ORM\ManyToMany(
|
* @ORM\ManyToMany(
|
||||||
* targetEntity="Chill\MainBundle\Entity\GroupCenter",
|
* targetEntity="Chill\MainBundle\Entity\GroupCenter",
|
||||||
* inversedBy="users")
|
* inversedBy="users")
|
||||||
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
|
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
|
||||||
*/
|
*/
|
||||||
private $groupCenters;
|
private Collection $groupCenters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=200)
|
* @ORM\Column(type="string", length=200)
|
||||||
@ -98,12 +88,10 @@ class User implements AdvancedUserInterface
|
|||||||
private string $label = '';
|
private string $label = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var bool
|
|
||||||
*
|
|
||||||
* @ORM\Column(type="boolean")
|
* @ORM\Column(type="boolean")
|
||||||
* sf4 check: in yml was false by default !?
|
* sf4 check: in yml was false by default !?
|
||||||
*/
|
*/
|
||||||
private $locked = true;
|
private bool $locked = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity=Center::class)
|
* @ORM\ManyToOne(targetEntity=Center::class)
|
||||||
@ -117,20 +105,16 @@ class User implements AdvancedUserInterface
|
|||||||
private ?Scope $mainScope = null;
|
private ?Scope $mainScope = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @ORM\Column(type="string", length=255)
|
* @ORM\Column(type="string", length=255)
|
||||||
*/
|
*/
|
||||||
private $password;
|
private string $password = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @internal must be set to null if we use bcrypt
|
* @internal must be set to null if we use bcrypt
|
||||||
*
|
*
|
||||||
* @ORM\Column(type="string", length=255, nullable=true)
|
* @ORM\Column(type="string", length=255, nullable=true)
|
||||||
*/
|
*/
|
||||||
private $salt;
|
private ?string $salt = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\ManyToOne(targetEntity=UserJob::class)
|
* @ORM\ManyToOne(targetEntity=UserJob::class)
|
||||||
@ -138,22 +122,18 @@ class User implements AdvancedUserInterface
|
|||||||
private ?UserJob $userJob = null;
|
private ?UserJob $userJob = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @ORM\Column(type="string", length=80)
|
* @ORM\Column(type="string", length=80)
|
||||||
*/
|
*/
|
||||||
private $username;
|
private string $username = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
|
||||||
*
|
|
||||||
* @ORM\Column(
|
* @ORM\Column(
|
||||||
* type="string",
|
* type="string",
|
||||||
* length=80,
|
* length=80,
|
||||||
* unique=true,
|
* unique=true,
|
||||||
* nullable=true)
|
* nullable=true)
|
||||||
*/
|
*/
|
||||||
private $usernameCanonical;
|
private ?string $usernameCanonical = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User constructor.
|
* User constructor.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user