Refactored code to comply with PSR-*
Signed-off-by: Gergely POLONKAI <polesz@w00d5t0ck.info>
This commit is contained in:
@@ -13,380 +13,430 @@ use \KekRozsak\SecurityBundle\Entity\User;
|
||||
*/
|
||||
class UserData
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->emailPublic = false;
|
||||
$this->realNamePublic = false;
|
||||
$this->msnAddressPublic = false;
|
||||
$this->googleTalkPublic = false;
|
||||
$this->skypePublic = false;
|
||||
$this->phoneNumberPublic = false;
|
||||
}
|
||||
public function __construct()
|
||||
{
|
||||
$this->emailPublic = false;
|
||||
$this->realNamePublic = false;
|
||||
$this->msnAddressPublic = false;
|
||||
$this->googleTalkPublic = false;
|
||||
$this->skypePublic = false;
|
||||
$this->phoneNumberPublic = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var KekRozsak\SecurityBundle\Entity\User $user
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="NONE")
|
||||
* @ORM\OneToOne(targetEntity="KekRozsak\SecurityBundle\Entity\User", inversedBy="userData")
|
||||
* @ORM\JoinColumn(name="user_id")
|
||||
*/
|
||||
protected $user;
|
||||
/**
|
||||
* The User object this UserData belongs to
|
||||
*
|
||||
* @var KekRozsak\SecurityBundle\Entity\User $user
|
||||
*
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue(strategy="NONE")
|
||||
* @ORM\OneToOne(targetEntity="KekRozsak\SecurityBundle\Entity\User", inversedBy="userData")
|
||||
* @ORM\JoinColumn(name="user_id")
|
||||
*/
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
* Set user
|
||||
*
|
||||
* @param KekRozsak\SecurityBundle\Entity\User $user
|
||||
* @return UserData
|
||||
*/
|
||||
public function setUser(\KekRozsak\SecurityBundle\Entity\User $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set user
|
||||
*
|
||||
* @param KekRozsak\SecurityBundle\Entity\User $user
|
||||
* @return UserData
|
||||
*/
|
||||
public function setUser(\KekRozsak\SecurityBundle\Entity\User $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user
|
||||
*
|
||||
* @return KekRozsak\SecurityBundle\Entity\User
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
/**
|
||||
* Get user
|
||||
*
|
||||
* @return KekRozsak\SecurityBundle\Entity\User
|
||||
*/
|
||||
public function getUser()
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var boolean $emailPublic
|
||||
* @ORM\Column(type="boolean", name="email_public")
|
||||
*/
|
||||
protected $emailPublic;
|
||||
/**
|
||||
* TRUE if $user's e-mail address is public
|
||||
*
|
||||
* @var boolean $emailPublic
|
||||
*
|
||||
* @ORM\Column(type="boolean", name="email_public")
|
||||
*/
|
||||
protected $emailPublic;
|
||||
|
||||
/**
|
||||
* Set emailPublic
|
||||
*
|
||||
* @param boolean $emailPublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setEmailPublic($emailPublic)
|
||||
{
|
||||
$this->emailPublic = $emailPublic;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set emailPublic
|
||||
*
|
||||
* @param boolean $emailPublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setEmailPublic($emailPublic)
|
||||
{
|
||||
// TODO: Check if parameter is boolean!
|
||||
$this->emailPublic = $emailPublic;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get emailPublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getEmailPublic()
|
||||
{
|
||||
return $this->emailPublic;
|
||||
}
|
||||
/**
|
||||
* Get emailPublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isEmailPublic()
|
||||
{
|
||||
return $this->emailPublic;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string $realName
|
||||
* @ORM\Column(type="string", length=100, nullable=true, name="real_name")
|
||||
*/
|
||||
protected $realName;
|
||||
/**
|
||||
* The real name of $user
|
||||
*
|
||||
* @var string $realName
|
||||
*
|
||||
* @ORM\Column(type="string", length=100, nullable=true, name="real_name")
|
||||
*/
|
||||
protected $realName;
|
||||
|
||||
/**
|
||||
* Set realName
|
||||
*
|
||||
* @param string $realName
|
||||
* @return UserData
|
||||
*/
|
||||
public function setRealName($realName = null)
|
||||
{
|
||||
$this->realName = $realName;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set realName
|
||||
*
|
||||
* @param string $realName
|
||||
* @return UserData
|
||||
*/
|
||||
public function setRealName($realName = null)
|
||||
{
|
||||
// TODO: Check if empty!
|
||||
$this->realName = $realName;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get realName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRealName()
|
||||
{
|
||||
return $this->realName;
|
||||
}
|
||||
/**
|
||||
* Get realName
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getRealName()
|
||||
{
|
||||
return $this->realName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var boolean $realNamePublic
|
||||
* @ORM\Column(type="boolean", name="real_name_public")
|
||||
*/
|
||||
protected $realNamePublic;
|
||||
/**
|
||||
* TRUE is $user's real name is public
|
||||
*
|
||||
* @var boolean $realNamePublic
|
||||
*
|
||||
* @ORM\Column(type="boolean", name="real_name_public")
|
||||
*/
|
||||
protected $realNamePublic;
|
||||
|
||||
/**
|
||||
* Set realNamePublic
|
||||
*
|
||||
* @param boolean $realNamePublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setRealNamePublic($realNamePublic = false)
|
||||
{
|
||||
$this->realNamePublic = $realNamePublic;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set realNamePublic
|
||||
*
|
||||
* @param boolean $realNamePublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setRealNamePublic($realNamePublic = false)
|
||||
{
|
||||
// TODO: Check if parameter is boolean!
|
||||
$this->realNamePublic = $realNamePublic;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get realNamePublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getRealNamePublic()
|
||||
{
|
||||
return $this->realNamePublic;
|
||||
}
|
||||
/**
|
||||
* Get realNamePublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isRealNamePublic()
|
||||
{
|
||||
return $this->realNamePublic;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string $selfDescription
|
||||
* @ORM\Column(type="text", nullable=true, name="self_description")
|
||||
*/
|
||||
protected $selfDescription;
|
||||
/**
|
||||
* The self description of $user
|
||||
*
|
||||
* @var string $selfDescription
|
||||
*
|
||||
* @ORM\Column(type="text", nullable=true, name="self_description")
|
||||
*/
|
||||
protected $selfDescription;
|
||||
|
||||
/**
|
||||
* Set selfDescription
|
||||
*
|
||||
* @param string $selfDescription
|
||||
* @return UserData
|
||||
*/
|
||||
public function setSelfDescription($selfDescription = null)
|
||||
{
|
||||
$this->selfDescription = $selfDescription;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set selfDescription
|
||||
*
|
||||
* @param string $selfDescription
|
||||
* @return UserData
|
||||
*/
|
||||
public function setSelfDescription($selfDescription = null)
|
||||
{
|
||||
$this->selfDescription = $selfDescription;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get selfDescription
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSelfDescription()
|
||||
{
|
||||
return $this->selfDescription;
|
||||
}
|
||||
/**
|
||||
* Get selfDescription
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSelfDescription()
|
||||
{
|
||||
return $this->selfDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string $msnAddress
|
||||
* @ORM\Column(type="string", length=100, nullable=true, name="msn_address")
|
||||
*/
|
||||
protected $msnAddress;
|
||||
/**
|
||||
* The MSN address of $user
|
||||
*
|
||||
* @var string $msnAddress
|
||||
*
|
||||
* @ORM\Column(type="string", length=100, nullable=true, name="msn_address")
|
||||
*/
|
||||
protected $msnAddress;
|
||||
|
||||
/**
|
||||
* Set msnAddress
|
||||
*
|
||||
* @param string $msnAddress
|
||||
* @return UserData
|
||||
*/
|
||||
public function setMsnAddress($msnAddress = null)
|
||||
{
|
||||
$this->msnAddress = $msnAddress;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set msnAddress
|
||||
*
|
||||
* @param string $msnAddress
|
||||
* @return UserData
|
||||
*/
|
||||
public function setMsnAddress($msnAddress = null)
|
||||
{
|
||||
// TODO: Check if empty!
|
||||
$this->msnAddress = $msnAddress;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get msnAddress
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMsnAddress()
|
||||
{
|
||||
return $this->msnAddress;
|
||||
}
|
||||
/**
|
||||
* Get msnAddress
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getMsnAddress()
|
||||
{
|
||||
return $this->msnAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var boolean $msnAddressPublic
|
||||
* @ORM\Column(type="boolean", name="msn_address_public")
|
||||
*/
|
||||
protected $msnAddressPublic;
|
||||
/**
|
||||
* TRUE if $user's MSN address is public
|
||||
*
|
||||
* @var boolean $msnAddressPublic
|
||||
*
|
||||
* @ORM\Column(type="boolean", name="msn_address_public")
|
||||
*/
|
||||
protected $msnAddressPublic;
|
||||
|
||||
/**
|
||||
* Set msnAddressPublic
|
||||
*
|
||||
* @param boolean $msnAddressPublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setMsnAddressPublic($msnAddressPublic)
|
||||
{
|
||||
$this->msnAddressPublic = $msnAddressPublic;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set msnAddressPublic
|
||||
*
|
||||
* @param boolean $msnAddressPublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setMsnAddressPublic($msnAddressPublic)
|
||||
{
|
||||
// TODO: Check if parameter is boolean!
|
||||
$this->msnAddressPublic = $msnAddressPublic;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get msnAddressPublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getMsnAddressPublic()
|
||||
{
|
||||
return $this->msnAddressPublic;
|
||||
}
|
||||
/**
|
||||
* Get msnAddressPublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isMsnAddressPublic()
|
||||
{
|
||||
return $this->msnAddressPublic;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string $googleTalk
|
||||
* @ORM\Column(type="string", length=100, nullable=true, name="google_talk")
|
||||
*/
|
||||
protected $googleTalk;
|
||||
/**
|
||||
* Google Talk address of $user
|
||||
*
|
||||
* @var string $googleTalk
|
||||
*
|
||||
* @ORM\Column(type="string", length=100, nullable=true, name="google_talk")
|
||||
*/
|
||||
protected $googleTalk;
|
||||
|
||||
/**
|
||||
* Set googleTalk
|
||||
*
|
||||
* @param string $googleTalk
|
||||
* @return UserData
|
||||
*/
|
||||
public function setGoogleTalk($googleTalk = null)
|
||||
{
|
||||
$this->googleTalk = $googleTalk;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set googleTalk
|
||||
*
|
||||
* @param string $googleTalk
|
||||
* @return UserData
|
||||
*/
|
||||
public function setGoogleTalk($googleTalk = null)
|
||||
{
|
||||
// TODO: Check if empty!
|
||||
$this->googleTalk = $googleTalk;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get googleTalk
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGoogleTalk()
|
||||
{
|
||||
return $this->googleTalk;
|
||||
}
|
||||
/**
|
||||
* Get googleTalk
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getGoogleTalk()
|
||||
{
|
||||
return $this->googleTalk;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var boolean $googleTalkPublic
|
||||
* @ORM\Column(type="boolean", name="google_talk_public")
|
||||
*/
|
||||
protected $googleTalkPublic;
|
||||
/**
|
||||
* TRUE if $user's Google Talk address is public
|
||||
*
|
||||
* @var boolean $googleTalkPublic
|
||||
*
|
||||
* @ORM\Column(type="boolean", name="google_talk_public")
|
||||
*/
|
||||
protected $googleTalkPublic;
|
||||
|
||||
/**
|
||||
* Set googleTalkPublic
|
||||
*
|
||||
* @param boolean $googleTalkPublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setGoogleTalkPublic($googleTalkPublic)
|
||||
{
|
||||
$this->googleTalkPublic = $googleTalkPublic;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set googleTalkPublic
|
||||
*
|
||||
* @param boolean $googleTalkPublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setGoogleTalkPublic($googleTalkPublic)
|
||||
{
|
||||
// TODO: Check if parameter is boolean!
|
||||
$this->googleTalkPublic = $googleTalkPublic;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get googleTalkPublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getGoogleTalkPublic()
|
||||
{
|
||||
return $this->googleTalkPublic;
|
||||
}
|
||||
/**
|
||||
* Get googleTalkPublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isGoogleTalkPublic()
|
||||
{
|
||||
return $this->googleTalkPublic;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string $skype
|
||||
* @ORM\Column(type="string", length=100, nullable=true, name="skype")
|
||||
*/
|
||||
protected $skype;
|
||||
/**
|
||||
* Skype name of $user
|
||||
*
|
||||
* @var string $skype
|
||||
*
|
||||
* @ORM\Column(type="string", length=100, nullable=true, name="skype")
|
||||
*/
|
||||
protected $skype;
|
||||
|
||||
/**
|
||||
* Set skype
|
||||
*
|
||||
* @param string $skype
|
||||
* @return UserData
|
||||
*/
|
||||
public function setSkype($skype = null)
|
||||
{
|
||||
$this->skype = $skype;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set skype
|
||||
*
|
||||
* @param string $skype
|
||||
* @return UserData
|
||||
*/
|
||||
public function setSkype($skype = null)
|
||||
{
|
||||
// TODO: Check if empty!
|
||||
$this->skype = $skype;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get skype
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSkype()
|
||||
{
|
||||
return $this->skype;
|
||||
}
|
||||
/**
|
||||
* Get skype
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSkype()
|
||||
{
|
||||
return $this->skype;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var boolean $skypePublic
|
||||
* @ORM\Column(type="boolean", name="skype_public")
|
||||
*/
|
||||
protected $skypePublic;
|
||||
/**
|
||||
* TRUE if $user's Skype name is public
|
||||
*
|
||||
* @var boolean $skypePublic
|
||||
*
|
||||
* @ORM\Column(type="boolean", name="skype_public")
|
||||
*/
|
||||
protected $skypePublic;
|
||||
|
||||
/**
|
||||
* Set skypePublic
|
||||
*
|
||||
* @param boolean $skypePublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setSkypePublic($skypePublic)
|
||||
{
|
||||
$this->skypePublic = $skypePublic;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set skypePublic
|
||||
*
|
||||
* @param boolean $skypePublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setSkypePublic($skypePublic)
|
||||
{
|
||||
// TODO: Check if parameter is boolean!
|
||||
$this->skypePublic = $skypePublic;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get skypePublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getSkypePublic()
|
||||
{
|
||||
return $this->skypePublic;
|
||||
}
|
||||
/**
|
||||
* Get skypePublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isSkypePublic()
|
||||
{
|
||||
return $this->skypePublic;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var string $phoneNumber
|
||||
* @ORM\Column(type="string", length=30, nullable=true, name="phone_number")
|
||||
*/
|
||||
protected $phoneNumber;
|
||||
/**
|
||||
* Phone number of $user
|
||||
*
|
||||
* @var string $phoneNumber
|
||||
*
|
||||
* @ORM\Column(type="string", length=30, nullable=true, name="phone_number")
|
||||
*/
|
||||
protected $phoneNumber;
|
||||
|
||||
/**
|
||||
* Set phoneNumber
|
||||
*
|
||||
* @param string $phoneNumber
|
||||
* @return UserData
|
||||
*/
|
||||
public function setPhoneNumber($phoneNumber = null)
|
||||
{
|
||||
$this->phoneNumber = $phoneNumber;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set phoneNumber
|
||||
*
|
||||
* @param string $phoneNumber
|
||||
* @return UserData
|
||||
*/
|
||||
public function setPhoneNumber($phoneNumber = null)
|
||||
{
|
||||
// TODO: Check if empty!
|
||||
$this->phoneNumber = $phoneNumber;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get phoneNumber
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPhoneNumber()
|
||||
{
|
||||
return $this->phoneNumber;
|
||||
}
|
||||
/**
|
||||
* Get phoneNumber
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPhoneNumber()
|
||||
{
|
||||
return $this->phoneNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var boolean $phoneNumberPublic
|
||||
* @ORM\Column(type="boolean", name="phone_number_public")
|
||||
*/
|
||||
protected $phoneNumberPublic;
|
||||
/**
|
||||
* TRUE if $user's phone number is public
|
||||
*
|
||||
* @var boolean $phoneNumberPublic
|
||||
*
|
||||
* @ORM\Column(type="boolean", name="phone_number_public")
|
||||
*/
|
||||
protected $phoneNumberPublic;
|
||||
|
||||
/**
|
||||
* Set phoneNumberPublic
|
||||
*
|
||||
* @param boolean $phoneNumberPublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setPhoneNumberPublic($phoneNumberPublic)
|
||||
{
|
||||
$this->phoneNumberPublic = $phoneNumberPublic;
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Set phoneNumberPublic
|
||||
*
|
||||
* @param boolean $phoneNumberPublic
|
||||
* @return UserData
|
||||
*/
|
||||
public function setPhoneNumberPublic($phoneNumberPublic)
|
||||
{
|
||||
// TODO: Check if parameter is boolean!
|
||||
$this->phoneNumberPublic = $phoneNumberPublic;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get phoneNumberPublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function getPhoneNumberPublic()
|
||||
{
|
||||
return $this->phoneNumberPublic;
|
||||
}
|
||||
/**
|
||||
* Get phoneNumberPublic
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isPhoneNumberPublic()
|
||||
{
|
||||
return $this->phoneNumberPublic;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user