for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace WebCMS\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @property-read int $id
* @property-read string $username
* @property string $email
* @property string $password
* @property string $role
*/
class User extends Entity
{
* @ORM\Column(unique=true)
* @var string
private $username;
* @ORM\Column
private $name;
private $email;
private $password;
* @orm\ManyToOne(targetEntity="Role", fetch="EAGER")
*
* @orm\JoinColumn(name="role_id", referencedColumnName="id", onDelete="SET NULL")
private $role;
* @return string
public function getUsername()
return $this->username;
}
public function getPassword()
return $this->password;
* @param string
* @return User
public function setPassword($password)
$this->password = $password;
return $this;
public function getEmail()
return $this->email;
* @param string $email
public function setEmail($email)
$this->email = $email;
* @return Role
public function getRole()
return $this->role;
* @param Role $role
public function setRole($role)
$this->role = $role;
public function getName()
return $this->name;
* @param string $name
public function setName($name)
$this->name = $name;
* @param string $username
public function setUsername($username)
$this->username = $username;