Skip to content

Commit b771de1

Browse files
jeremykenedyStyleCIBot
authored andcommitted
Apply fixes from StyleCI
1 parent 5bfbed0 commit b771de1

File tree

94 files changed

+1360
-1581
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1360
-1581
lines changed

app/Console/Commands/DeleteExpiredActivations.php

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class DeleteExpiredActivations extends Command
2727
* Create a new command instance.
2828
*
2929
* DeleteExpiredActivations constructor.
30+
*
3031
* @param ActivationRepository $activationRepository
3132
*/
3233
public function __construct(ActivationRepository $activationRepository)

app/Console/Kernel.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ class Kernel extends ConsoleKernel
1919
/**
2020
* Define the application's command schedule.
2121
*
22-
* @param \Illuminate\Console\Scheduling\Schedule $schedule
22+
* @param \Illuminate\Console\Scheduling\Schedule $schedule
23+
*
2324
* @return void
2425
*/
2526
protected function schedule(Schedule $schedule)

app/Exceptions/Handler.php

+16-22
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
use App\Mail\ExceptionOccured;
66
use Exception;
7-
use Illuminate\Http\Request;
87
use Illuminate\Auth\AuthenticationException;
98
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
109
use Illuminate\Support\Facades\Log;
1110
use Mail;
1211
use Response;
13-
use Symfony\Component\Debug\ExceptionHandler as SymfonyExceptionHandler;
1412
use Symfony\Component\Debug\Exception\FlattenException;
13+
use Symfony\Component\Debug\ExceptionHandler as SymfonyExceptionHandler;
1514

1615
class Handler extends ExceptionHandler
1716
{
@@ -34,15 +33,15 @@ class Handler extends ExceptionHandler
3433
*
3534
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
3635
*
37-
* @param \Exception $exception
36+
* @param \Exception $exception
37+
*
3838
* @return void
3939
*/
4040
public function report(Exception $exception)
4141
{
42-
4342
$enableEmailExceptions = config('exceptions.emailExceptionEnabled');
4443

45-
if ($enableEmailExceptions === "") {
44+
if ($enableEmailExceptions === '') {
4645
$enableEmailExceptions = config('exceptions.emailExceptionEnabledDefault');
4746
}
4847

@@ -56,25 +55,24 @@ public function report(Exception $exception)
5655
/**
5756
* Render an exception into an HTTP response.
5857
*
59-
* @param \Illuminate\Http\Request $request
60-
* @param \Exception $exception
58+
* @param \Illuminate\Http\Request $request
59+
* @param \Exception $exception
60+
*
6161
* @return \Illuminate\Http\Response
6262
*/
6363
public function render($request, Exception $exception)
6464
{
65-
6665
$userLevelCheck = $exception instanceof \jeremykenedy\LaravelRoles\Exceptions\RoleDeniedException ||
6766
$exception instanceof \jeremykenedy\LaravelRoles\Exceptions\RoleDeniedException ||
6867
$exception instanceof \jeremykenedy\LaravelRoles\Exceptions\PermissionDeniedException ||
6968
$exception instanceof \jeremykenedy\LaravelRoles\Exceptions\LevelDeniedException;
7069

7170
if ($userLevelCheck) {
72-
7371
if ($request->expectsJson()) {
74-
return Response::json(array(
75-
'error' => 403,
76-
'message' => 'Unauthorized.'
77-
), 403);
72+
return Response::json([
73+
'error' => 403,
74+
'message' => 'Unauthorized.',
75+
], 403);
7876
}
7977

8078
abort(403);
@@ -83,12 +81,12 @@ public function render($request, Exception $exception)
8381
return parent::render($request, $exception);
8482
}
8583

86-
8784
/**
8885
* Convert an authentication exception into an unauthenticated response.
8986
*
90-
* @param \Illuminate\Http\Request $request
91-
* @param \Illuminate\Auth\AuthenticationException $exception
87+
* @param \Illuminate\Http\Request $request
88+
* @param \Illuminate\Auth\AuthenticationException $exception
89+
*
9290
* @return \Illuminate\Http\Response
9391
*/
9492
protected function unauthenticated($request, AuthenticationException $exception)
@@ -103,24 +101,20 @@ protected function unauthenticated($request, AuthenticationException $exception)
103101
/**
104102
* Sends an email upon exception.
105103
*
106-
* @param \Exception $exception
104+
* @param \Exception $exception
105+
*
107106
* @return void
108107
*/
109108
public function sendEmail(Exception $exception)
110109
{
111110
try {
112-
113111
$e = FlattenException::create($exception);
114112
$handler = new SymfonyExceptionHandler();
115113
$html = $handler->getHtml($e);
116114

117115
Mail::send(new ExceptionOccured($html));
118-
119116
} catch (Exception $exception) {
120-
121117
Log::error($exception);
122-
123118
}
124119
}
125-
126120
}

app/Http/Controllers/AdminDetailsController.php

+6-11
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22

33
namespace App\Http\Controllers;
44

5-
use Illuminate\Http\Request;
65
use Illuminate\Support\Facades\Route;
7-
use App\Http\Requests;
8-
use File;
96

107
class AdminDetailsController extends Controller
118
{
12-
139
/**
1410
* Create a new controller instance.
1511
*
@@ -27,17 +23,16 @@ public function __construct()
2723
*/
2824
public function listRoutes()
2925
{
30-
$routes = Route::getRoutes();
31-
$data = [
32-
'routes' => $routes
33-
];
26+
$routes = Route::getRoutes();
27+
$data = [
28+
'routes' => $routes,
29+
];
3430

35-
return view('pages.admin.route-details', $data);
31+
return view('pages.admin.route-details', $data);
3632
}
3733

3834
public function listPHPInfo()
3935
{
4036
return view('pages.admin.php-details');
4137
}
42-
43-
}
38+
}

0 commit comments

Comments
 (0)