Commit f61d8660 authored by Christian Giupponi's avatar Christian Giupponi

Added return type and used getUser function instead of check

parent fa5cccd4
...@@ -123,7 +123,7 @@ class SentinelAuthentication implements Authentication ...@@ -123,7 +123,7 @@ class SentinelAuthentication implements Authentication
* @param $permission * @param $permission
* @return bool * @return bool
*/ */
public function hasAccess($permission) public function hasAccess($permission) : bool
{ {
if (! Sentinel::check()) { if (! Sentinel::check()) {
return false; return false;
...@@ -136,7 +136,7 @@ class SentinelAuthentication implements Authentication ...@@ -136,7 +136,7 @@ class SentinelAuthentication implements Authentication
* Check if the user is logged in * Check if the user is logged in
* @return bool * @return bool
*/ */
public function check() public function check() : bool
{ {
$user = Sentinel::check(); $user = Sentinel::check();
...@@ -153,14 +153,14 @@ class SentinelAuthentication implements Authentication ...@@ -153,14 +153,14 @@ class SentinelAuthentication implements Authentication
*/ */
public function user() public function user()
{ {
return Sentinel::check(); return Sentinel::getUser();
} }
/** /**
* Get the ID for the currently authenticated user * Get the ID for the currently authenticated user
* @return int * @return int
*/ */
public function id() public function id() : int
{ {
$user = $this->user(); $user = $this->user();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment