@@ -33,28 +33,28 @@ |
||
| 33 | 33 | { |
| 34 | 34 | |
| 35 | 35 | $schedule->command('bb:calculate-proposal-votes')->hourly() |
| 36 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/U6l211ROnnZR1vI'); } ); |
|
| 36 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/U6l211ROnnZR1vI'); } ); |
|
| 37 | 37 | |
| 38 | 38 | $schedule->command('bb:check-memberships')->dailyAt('06:00') |
| 39 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/76TWKkWBBpaIyOe'); } ); |
|
| 39 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/76TWKkWBBpaIyOe'); } ); |
|
| 40 | 40 | |
| 41 | 41 | $schedule->command('bb:fix-equipment-log')->hourly() |
| 42 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/nxi4SJkwZpIAkBv'); } ); |
|
| 42 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/nxi4SJkwZpIAkBv'); } ); |
|
| 43 | 43 | |
| 44 | 44 | $schedule->command('bb:calculate-equipment-fees')->dailyAt('02:00') |
| 45 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/tFdRdkUoqSa8X66'); } ); |
|
| 45 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/tFdRdkUoqSa8X66'); } ); |
|
| 46 | 46 | |
| 47 | 47 | $schedule->command('bb:update-balances')->dailyAt('03:00') |
| 48 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/TSmoQANsHU9jbtU'); } ); |
|
| 48 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/TSmoQANsHU9jbtU'); } ); |
|
| 49 | 49 | |
| 50 | 50 | $schedule->command('bb:create-todays-sub-charges')->dailyAt('01:00') |
| 51 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/wSIUR1E2wjVBzPg'); } ); |
|
| 51 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/wSIUR1E2wjVBzPg'); } ); |
|
| 52 | 52 | |
| 53 | 53 | $schedule->command('bb:bill-members')->dailyAt('01:30') |
| 54 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/nxAz59P6LXlu2P1'); } ); |
|
| 54 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/nxAz59P6LXlu2P1'); } ); |
|
| 55 | 55 | |
| 56 | 56 | $schedule->command('device:check-online')->everyTenMinutes() |
| 57 | - ->then( function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/WU4zql7LwZs1CzT'); } ); |
|
| 57 | + ->then(function () { $this->pingIfProduction('http://beats.envoyer.io/heartbeat/WU4zql7LwZs1CzT'); } ); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | protected function pingIfProduction($url) |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | public function heartbeatWarning() |
| 47 | 47 | { |
| 48 | 48 | //If the last heartbeat was more than an hour ago there is an issue |
| 49 | - if ( $this->monitor_heartbeat && ($this->last_heartbeat < Carbon::now()->subHour())) { |
|
| 49 | + if ($this->monitor_heartbeat && ($this->last_heartbeat < Carbon::now()->subHour())) { |
|
| 50 | 50 | return true; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -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; |
@@ -2,6 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | abstract class Event { |
| 4 | 4 | |
| 5 | - // |
|
| 5 | + // |
|
| 6 | 6 | |
| 7 | 7 | } |
@@ -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 | |
@@ -9,43 +9,43 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | class Handler extends ExceptionHandler { |
| 11 | 11 | |
| 12 | - /** |
|
| 13 | - * A list of the exception types that should not be reported. |
|
| 14 | - * |
|
| 15 | - * @var array |
|
| 16 | - */ |
|
| 17 | - protected $dontReport = [ |
|
| 12 | + /** |
|
| 13 | + * A list of the exception types that should not be reported. |
|
| 14 | + * |
|
| 15 | + * @var array |
|
| 16 | + */ |
|
| 17 | + protected $dontReport = [ |
|
| 18 | 18 | HttpException::class, |
| 19 | 19 | NotFoundHttpException::class, |
| 20 | 20 | ModelNotFoundException::class, |
| 21 | 21 | MethodNotAllowedHttpException::class, |
| 22 | 22 | FormValidationException::class, |
| 23 | 23 | AuthenticationException::class, //These are logged separately below |
| 24 | - ]; |
|
| 24 | + ]; |
|
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Report or log an exception. |
|
| 28 | - * |
|
| 29 | - * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
|
| 30 | - * |
|
| 31 | - * @param \Exception $e |
|
| 32 | - * @return void |
|
| 33 | - */ |
|
| 34 | - public function report(Exception $e) |
|
| 35 | - { |
|
| 26 | + /** |
|
| 27 | + * Report or log an exception. |
|
| 28 | + * |
|
| 29 | + * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
|
| 30 | + * |
|
| 31 | + * @param \Exception $e |
|
| 32 | + * @return void |
|
| 33 | + */ |
|
| 34 | + public function report(Exception $e) |
|
| 35 | + { |
|
| 36 | 36 | //The parent will log exceptions that aren't of the types above |
| 37 | - parent::report($e); |
|
| 38 | - } |
|
| 37 | + parent::report($e); |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - /** |
|
| 41 | - * Render an exception into an HTTP response. |
|
| 42 | - * |
|
| 43 | - * @param \Illuminate\Http\Request $request |
|
| 44 | - * @param \Exception $e |
|
| 45 | - * @return \Illuminate\Http\Response |
|
| 46 | - */ |
|
| 47 | - public function render($request, Exception $e) |
|
| 48 | - { |
|
| 40 | + /** |
|
| 41 | + * Render an exception into an HTTP response. |
|
| 42 | + * |
|
| 43 | + * @param \Illuminate\Http\Request $request |
|
| 44 | + * @param \Exception $e |
|
| 45 | + * @return \Illuminate\Http\Response |
|
| 46 | + */ |
|
| 47 | + public function render($request, Exception $e) |
|
| 48 | + { |
|
| 49 | 49 | if ($e instanceof FormValidationException) { |
| 50 | 50 | if ($request->wantsJson()) { |
| 51 | 51 | return \Response::json($e->getErrors(), 422); |
@@ -92,8 +92,8 @@ discard block |
||
| 92 | 92 | return \Response::json(['error' => $e->getMessage()], $e->getStatusCode()); |
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | - return parent::render($request, $e); |
|
| 96 | - } |
|
| 95 | + return parent::render($request, $e); |
|
| 96 | + } |
|
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | 99 | * Render an exception using Whoops. |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | ModelNotFoundException::class, |
| 21 | 21 | MethodNotAllowedHttpException::class, |
| 22 | 22 | FormValidationException::class, |
| 23 | - AuthenticationException::class, //These are logged separately below |
|
| 23 | + AuthenticationException::class, //These are logged separately below |
|
| 24 | 24 | ]; |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | if ($e instanceof NotImplementedException) { |
| 66 | - \Notification::error("NotImplementedException: ".$e->getMessage()); |
|
| 66 | + \Notification::error("NotImplementedException: " . $e->getMessage()); |
|
| 67 | 67 | \Log::warning($e); |
| 68 | 68 | return redirect()->back()->withInput(); |
| 69 | 69 | } |
@@ -72,8 +72,8 @@ discard block |
||
| 72 | 72 | if ($request->wantsJson()) { |
| 73 | 73 | return \Response::json(['error' => $e->getMessage()], 403); |
| 74 | 74 | } |
| 75 | - $userString = \Auth::guest() ? "A guest": \Auth::user()->name; |
|
| 76 | - \Log::warning($userString." tried to access something they weren't supposed to."); |
|
| 75 | + $userString = \Auth::guest() ? "A guest" : \Auth::user()->name; |
|
| 76 | + \Log::warning($userString . " tried to access something they weren't supposed to."); |
|
| 77 | 77 | |
| 78 | 78 | return \Response::view('errors.403', [], 403); |
| 79 | 79 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | $e = new HttpException(404, $e->getMessage()); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - if (config('app.debug') && $this->shouldReport($e) && !$request->wantsJson()) |
|
| 85 | + if (config('app.debug') && $this->shouldReport($e) && ! $request->wantsJson()) |
|
| 86 | 86 | { |
| 87 | 87 | return $this->renderExceptionWithWhoops($e); |
| 88 | 88 | } |
@@ -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 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | function __construct(ACSNodeRepository $acsNodeRepository, KeyFobAccess $keyFobAccess, PaymentRepository $paymentRepository) |
| 25 | 25 | { |
| 26 | 26 | $this->acsNodeRepository = $acsNodeRepository; |
| 27 | - $this->keyFobAccess = $keyFobAccess; |
|
| 27 | + $this->keyFobAccess = $keyFobAccess; |
|
| 28 | 28 | $this->paymentRepository = $paymentRepository; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | class AuthController extends Controller { |
| 9 | 9 | |
| 10 | - /* |
|
| 10 | + /* |
|
| 11 | 11 | |-------------------------------------------------------------------------- |
| 12 | 12 | | Registration & Login Controller |
| 13 | 13 | |-------------------------------------------------------------------------- |
@@ -18,21 +18,21 @@ discard block |
||
| 18 | 18 | | |
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | - use AuthenticatesAndRegistersUsers; |
|
| 21 | + use AuthenticatesAndRegistersUsers; |
|
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Create a new authentication controller instance. |
|
| 25 | - * |
|
| 26 | - * @param \Illuminate\Contracts\Auth\Guard $auth |
|
| 27 | - * @param \Illuminate\Contracts\Auth\Registrar $registrar |
|
| 28 | - * @return void |
|
| 29 | - */ |
|
| 30 | - public function __construct(Guard $auth, Registrar $registrar) |
|
| 31 | - { |
|
| 32 | - $this->auth = $auth; |
|
| 33 | - $this->registrar = $registrar; |
|
| 23 | + /** |
|
| 24 | + * Create a new authentication controller instance. |
|
| 25 | + * |
|
| 26 | + * @param \Illuminate\Contracts\Auth\Guard $auth |
|
| 27 | + * @param \Illuminate\Contracts\Auth\Registrar $registrar |
|
| 28 | + * @return void |
|
| 29 | + */ |
|
| 30 | + public function __construct(Guard $auth, Registrar $registrar) |
|
| 31 | + { |
|
| 32 | + $this->auth = $auth; |
|
| 33 | + $this->registrar = $registrar; |
|
| 34 | 34 | |
| 35 | - $this->middleware('guest', ['except' => 'getLogout']); |
|
| 36 | - } |
|
| 35 | + $this->middleware('guest', ['except' => 'getLogout']); |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | 38 | } |
@@ -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 | |-------------------------------------------------------------------------- |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | 'ContentType' => 'image/jpg', |
| 40 | 40 | 'ServerSideEncryption' => 'AES256', |
| 41 | 41 | )); |
| 42 | - } catch(\Exception $e) { |
|
| 42 | + } catch (\Exception $e) { |
|
| 43 | 43 | \Log::exception($e); |
| 44 | 44 | } |
| 45 | 45 | //Log::debug('Image saved :https://s3-eu-west-1.amazonaws.com/buildbrighton-bbms/'.$newFilename); |