for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* SocialConnect project
* @author: Patsura Dmitry @ovr <[email protected]>
*/
namespace SocialConnect\Common\Entity;
class User extends \stdClass
{
const SEX_MALE = 'male';
const SEX_FEMALE = 'female';
* @var string
public $id;
public $firstname;
public $lastname;
public $email;
* @var bool
public $emailVerified = false;
* @var \DateTime|null
protected $birthday;
* @var string|null
public $username;
* Should be female or male
*
protected $sex;
public $fullname;
public $pictureURL;
* @return \DateTime|null
public function getBirthday(): ?\DateTime
return $this->birthday;
}
* @param \DateTime|null $birthday
public function setBirthday(?\DateTime $birthday): void
$this->birthday = $birthday;
* @return string|null
public function getSex(): ?string
return $this->sex;
* @param string $sex
public function setSex(string $sex): void
if ($sex !== self::SEX_MALE && $sex !== self::SEX_FEMALE) {
throw new \InvalidArgumentException('Argument $sex is not valid');
$this->sex = $sex;