*/
public function addUser(User $user): Dance {
//Add from owning side
- $user->addSubscriber($this);
+ $user->addDance($this);
$this->users[] = $user;
* @return bool
*/
public function removeUser(User $user): bool {
+ if (!$this->dances->contains($user)) {
+ return true;
+ }
+
//Remove from owning side
- $user->removeSubscriber($this);
+ $user->removeDance($this);
return $this->users->removeElement($user);
}