Compliance with commonly used phpmd rules

This commit is contained in:
Jordan Hoff
2016-08-03 10:10:35 -05:00
parent 7f24b9183a
commit b7d684ef82

View File

@@ -26,39 +26,39 @@ class Handler extends ExceptionHandler
* *
* This is a great spot to send exceptions to Sentry, Bugsnag, etc. * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
* *
* @param \Exception $e * @param \Exception $exception
* @return void * @return void
*/ */
public function report(Exception $e) public function report(Exception $exception)
{ {
parent::report($e); parent::report($exception);
} }
/** /**
* Render an exception into an HTTP response. * Render an exception into an HTTP response.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Exception $e * @param \Exception $exception
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function render($request, Exception $e) public function render($request, Exception $exception)
{ {
return parent::render($request, $e); return parent::render($request, $exception);
} }
/** /**
* Convert an authentication exception into an unauthenticated response. * Convert an authentication exception into an unauthenticated response.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $e * @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
protected function unauthenticated($request, AuthenticationException $e) protected function unauthenticated($request, AuthenticationException $exception)
{ {
if ($request->expectsJson()) { if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401); return response()->json(['error' => 'Unauthenticated.'], 401);
} else {
return redirect()->guest('login');
} }
return redirect()->guest('login');
} }
} }