@@ -35,7 +35,8 @@ |
||
35 | 35 | * @param string $hash |
36 | 36 | * @return Notification |
37 | 37 | */ |
38 | - public static function logNew($userId, $message, $type, $hash) { |
|
38 | + public static function logNew($userId, $message, $type, $hash) |
|
39 | + { |
|
39 | 40 | $existingNotifications = Notification::where('user_id', $userId)->where('hash', $hash)->first(); |
40 | 41 | if ($existingNotifications) { |
41 | 42 | return $existingNotifications; |
@@ -18,7 +18,8 @@ |
||
18 | 18 | return $this->belongsToMany('\BB\Entities\User')->withTimestamps(); |
19 | 19 | } |
20 | 20 | |
21 | - public static function findByName($name) { |
|
21 | + public static function findByName($name) |
|
22 | + { |
|
22 | 23 | $role = self::where('name', $name)->first(); |
23 | 24 | if ($role) { |
24 | 25 | return $role; |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php namespace BB\Events; |
2 | 2 | |
3 | -abstract class Event { |
|
3 | +abstract class Event |
|
4 | +{ |
|
4 | 5 | |
5 | 6 | // |
6 | 7 |
@@ -7,7 +7,8 @@ discard block |
||
7 | 7 | use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; |
8 | 8 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
9 | 9 | |
10 | -class Handler extends ExceptionHandler { |
|
10 | +class Handler extends ExceptionHandler |
|
11 | +{ |
|
11 | 12 | |
12 | 13 | /** |
13 | 14 | * A list of the exception types that should not be reported. |
@@ -82,8 +83,7 @@ discard block |
||
82 | 83 | $e = new HttpException(404, $e->getMessage()); |
83 | 84 | } |
84 | 85 | |
85 | - if (config('app.debug') && $this->shouldReport($e) && !$request->wantsJson()) |
|
86 | - { |
|
86 | + if (config('app.debug') && $this->shouldReport($e) && !$request->wantsJson()) { |
|
87 | 87 | return $this->renderExceptionWithWhoops($e); |
88 | 88 | } |
89 | 89 |
@@ -5,7 +5,8 @@ |
||
5 | 5 | use Illuminate\Contracts\Auth\Registrar; |
6 | 6 | use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers; |
7 | 7 | |
8 | -class AuthController extends Controller { |
|
8 | +class AuthController extends Controller |
|
9 | +{ |
|
9 | 10 | |
10 | 11 | /* |
11 | 12 | |-------------------------------------------------------------------------- |
@@ -4,7 +4,8 @@ |
||
4 | 4 | use Illuminate\Routing\Controller as BaseController; |
5 | 5 | use Illuminate\Foundation\Validation\ValidatesRequests; |
6 | 6 | |
7 | -abstract class Controller extends BaseController { |
|
7 | +abstract class Controller extends BaseController |
|
8 | +{ |
|
8 | 9 | |
9 | 10 | use DispatchesCommands, ValidatesRequests; |
10 | 11 |
@@ -6,7 +6,8 @@ |
||
6 | 6 | use Illuminate\Support\Facades\Response; |
7 | 7 | use Illuminate\Support\Facades\Storage; |
8 | 8 | |
9 | -class ExpensesController extends Controller { |
|
9 | +class ExpensesController extends Controller |
|
10 | +{ |
|
10 | 11 | |
11 | 12 | /** |
12 | 13 | * @var \BB\Validators\ExpenseValidator |
@@ -33,8 +33,7 @@ discard block |
||
33 | 33 | throw new FormValidationException('Error', $validator->errors()); |
34 | 34 | } |
35 | 35 | |
36 | - $response = Password::sendResetLink($request->only('email'), function(Message $message) |
|
37 | - { |
|
36 | + $response = Password::sendResetLink($request->only('email'), function(Message $message) { |
|
38 | 37 | $message->subject('Reset your password'); |
39 | 38 | }); |
40 | 39 | |
@@ -57,8 +56,7 @@ discard block |
||
57 | 56 | */ |
58 | 57 | public function getReset($token = null) |
59 | 58 | { |
60 | - if (is_null($token)) |
|
61 | - { |
|
59 | + if (is_null($token)) { |
|
62 | 60 | throw new NotFoundHttpException; |
63 | 61 | } |
64 | 62 |
@@ -3,7 +3,8 @@ discard block |
||
3 | 3 | use Closure; |
4 | 4 | use Illuminate\Contracts\Auth\Guard; |
5 | 5 | |
6 | -class Authenticate { |
|
6 | +class Authenticate |
|
7 | +{ |
|
7 | 8 | |
8 | 9 | /** |
9 | 10 | * The Guard implementation. |
@@ -32,14 +33,10 @@ discard block |
||
32 | 33 | */ |
33 | 34 | public function handle($request, Closure $next) |
34 | 35 | { |
35 | - if ($this->auth->guest()) |
|
36 | - { |
|
37 | - if ($request->ajax()) |
|
38 | - { |
|
36 | + if ($this->auth->guest()) { |
|
37 | + if ($request->ajax()) { |
|
39 | 38 | return response('Unauthorized.', 401); |
40 | - } |
|
41 | - else |
|
42 | - { |
|
39 | + } else { |
|
43 | 40 | return redirect()->guest('auth/login'); |
44 | 41 | } |
45 | 42 | } |