for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Developtech\AgilityBundle\Tests\Mock;
use Symfony\Component\Security\Core\User\UserInterface;
class User implements UserInterface {
/** @var string **/
protected $username;
protected $password;
protected $salt;
/** @var array **/
protected $roles;
/**
* @param string $username
* @param string $password
* @param string $salt
* @param array $roles
*/
public function __construct($username = '', $password = '', $salt = '', $roles = []) {
$this->username = $username;
$this->password = $password;
$this->salt = $salt;
$this->roles = $roles;
}
* @return string
public function getUsername() {
return $this->username;
public function getPassword() {
return $this->password;
public function getSalt() {
return $this->salt;
* @return array
public function getRoles() {
return $this->roles;
* @return boolean
public function eraseCredentials() {
return true;