| Conditions | 2 |
| Paths | 3 |
| Total Lines | 23 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function token(Guard $auth) |
||
| 28 | { |
||
| 29 | try { |
||
| 30 | $accessToken = $auth->facebookAuth(Input::get('code')); |
||
|
|
|||
| 31 | |||
| 32 | return response()->json([ |
||
| 33 | 'user' => [ |
||
| 34 | 'name' => Auth::user()->name, |
||
| 35 | 'facebookId' => Auth::user()->facebookId, |
||
| 36 | 'id' => Auth::user()->id |
||
| 37 | ], |
||
| 38 | 'token_type' => 'bearer', |
||
| 39 | 'access_token' => $accessToken |
||
| 40 | ]); |
||
| 41 | } catch (\Exception $e) { |
||
| 42 | Log::error( |
||
| 43 | 'Exception occured, code: ' . $e->getCode() |
||
| 44 | . ' with message: ' . $e->getMessage() |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | |||
| 48 | return response('Bad request.', 400); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.