We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98e8bef commit 9d9e0c9Copy full SHA for 9d9e0c9
1 file changed
src/Collectors/Auth.php
@@ -82,11 +82,14 @@ public function display(): string
82
/**
83
* Gets the "badge" value for the button.
84
*
85
- * @return int|null ID of the current User, or null when not logged in
+ * @return int|string|null ID of the current User, or null when not logged in
86
*/
87
- public function getBadgeValue(): ?int
+ public function getBadgeValue()
88
{
89
- return service('auth')->loggedIn() ? service('auth')->id() : null;
+ /** @var \CodeIgniter\Shield\Auth $auth */
90
+ $auth = service('auth');
91
+
92
+ return $auth->loggedIn() ? $auth->id() : null;
93
}
94
95
0 commit comments