for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Del\Passport\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
class PassportRole
{
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue
* @var int $id
private $id;
* @var int $userId
private $userId;
* many users have many roles
* @ORM\ManyToOne(targetEntity="Role")
* @ORM\JoinColumn(name="role", referencedColumnName="id")
* @var Role $role
private $role;
* @ORM\Column(type="integer", nullable=true)
* @var int $entityId
private $entityId;
* @return int
public function getId(): int
return $this->id;
}
* @param int $id
public function setId(int $id): void
$this->id = $id;
public function getUserId(): int
return $this->userId;
* @param int $userId
public function setUserId(int $userId): void
$this->userId = $userId;
* @return Role
public function getRole(): Role
return $this->role;
* @param Role $role
public function setRole(Role $role): void
$this->role = $role;
* @return int|null
public function getEntityId(): ?int
return $this->entityId;
* @param int $entityId
public function setEntityId(int $entityId): void
$this->entityId = $entityId;