Skip to content

Commit

Permalink
Add title fallback for roles & groups
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Apr 16, 2024
1 parent 7aee556 commit ee67637
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Auth/File/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public function __construct()
public function title(?string $title = null)
{
if (func_num_args() === 0) {
return $this->title;
}
return $this->title ?? ucfirst($this->handle);
};

$this->title = $title;

Expand Down
2 changes: 1 addition & 1 deletion src/Auth/UserGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct()
public function title(?string $title = null)
{
if (func_num_args() === 0) {
return $this->title;
return $this->title ?? ucfirst($this->handle);
}

$this->title = $title;
Expand Down

0 comments on commit ee67637

Please sign in to comment.