@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public $loggedInTestingUser; |
38 | 38 | |
39 | 39 | /** |
40 | - * @param $endpoint |
|
40 | + * @param string $endpoint |
|
41 | 41 | * @param string $verb |
42 | 42 | * @param array $data |
43 | 43 | * @param bool $protected |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * So this can be used to test endpoints that are protected by visitors |
111 | 111 | * access. |
112 | 112 | * |
113 | - * @return App\Containers\User\Models\User|mixed |
|
113 | + * @return User |
|
114 | 114 | */ |
115 | 115 | public function getVisitor() |
116 | 116 | { |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
127 | - * @return App\Containers\User\Models\User|mixed |
|
127 | + * @return User |
|
128 | 128 | */ |
129 | 129 | public function getLoggedInTestingAdmin() |
130 | 130 | { |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | /** |
163 | 163 | * @param null $userDetails |
164 | 164 | * |
165 | - * @return mixed |
|
165 | + * @return User |
|
166 | 166 | */ |
167 | 167 | public function registerAndLoginTestingUser($userDetails = null) |
168 | 168 | { |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | /** |
194 | 194 | * @param null $userDetails |
195 | 195 | * |
196 | - * @return mixed |
|
196 | + * @return User |
|
197 | 197 | */ |
198 | 198 | public function registerAndLoginTestingAdmin($userDetails = null) |
199 | 199 | { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | * |
210 | 210 | * @param null $userDetails |
211 | 211 | * |
212 | - * @return mixed |
|
212 | + * @return User |
|
213 | 213 | */ |
214 | 214 | public function registerAndLoginTestingDeveloper($userDetails = null) |
215 | 215 | { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | |
94 | 94 | $token = str_replace('Bearer ', '', $request->header('authorization')); |
95 | 95 | |
96 | - if(!$token){ |
|
96 | + if (!$token) { |
|
97 | 97 | throw new AuthenticationFailedException('Empty Token!'); |
98 | 98 | } |
99 | 99 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | throw new UserNotPermittedException(); |
114 | 114 | } |
115 | 115 | |
116 | - }else{ |
|
116 | + } else { |
|
117 | 117 | return (App::make(\Dingo\Api\Http\Middleware\Auth::class))->handle($request, $next); |
118 | 118 | // another way to do handle this is by calling `$user = $this->jwtAuthAdapter->toUser($token);` |
119 | 119 | // and continuing the execution of this code till the last return, but to maintain consistency |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $this->attachRole($user, $role); |
44 | 44 | } |
45 | 45 | |
46 | - }else{ |
|
46 | + } else{ |
|
47 | 47 | $this->attachRole($user, $roles); |
48 | 48 | } |
49 | 49 |