public function addRole($role) { if (!$this->hasRole($role)) { $this->roles[] = strtoupper($role); } }