| 1 | <?php |
||
| 30 | class Group extends BaseGroup |
||
| 31 | { |
||
| 32 | /** |
||
| 33 | * @ORM\Id |
||
| 34 | * @ORM\Column(type="integer") |
||
| 35 | * @ORM\GeneratedValue(strategy="AUTO") |
||
| 36 | */ |
||
| 37 | protected $id; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | protected $name; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @var array |
||
| 46 | */ |
||
| 47 | protected $roles; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Staff\User", mappedBy="groups") |
||
| 51 | * |
||
| 52 | */ |
||
| 53 | protected $users; |
||
| 54 | |||
| 55 | public function __toString() |
||
| 59 | |||
| 60 | |||
| 61 | /** |
||
| 62 | * Get Users |
||
| 63 | * |
||
| 64 | * @return AppBundle\Entity\Staff\User |
||
| 65 | */ |
||
| 66 | public function getUsers() |
||
| 70 | |||
| 71 | /** |
||
| 72 | * Add users |
||
| 73 | * |
||
| 74 | * @param \AppBundle\Entity\Staff\User $users |
||
| 75 | * @return Group |
||
| 76 | */ |
||
| 77 | public function addUser(User $users) |
||
| 83 | |||
| 84 | /** |
||
| 85 | * {@inheritdoc} |
||
| 86 | */ |
||
| 87 | public function hasRole($role) |
||
| 97 | |||
| 98 | /** |
||
| 99 | * Remove users |
||
| 100 | * |
||
| 101 | * @param \AppBundle\Entity\Staff\User $users |
||
| 102 | */ |
||
| 103 | public function removeUser(User $users) |
||
| 107 | } |
||
| 108 |
Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.