diff --git a/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php b/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php index 424f42b6..28271b72 100644 --- a/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php +++ b/app/Bus/Handlers/Commands/Incident/ReportIncidentCommandHandler.php @@ -63,7 +63,7 @@ class ReportIncidentCommandHandler 'stickied' => $command->stickied, ]; - if ($template = IncidentTemplate::where('slug', $command->template)->first()) { + if ($template = IncidentTemplate::where('slug', '=', $command->template)->first()) { $data['message'] = $this->parseTemplate($template, $command); } else { $data['message'] = $command->message; diff --git a/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php b/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php index 55d1323f..665e49a8 100644 --- a/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php +++ b/app/Bus/Handlers/Commands/Incident/UpdateIncidentCommandHandler.php @@ -56,7 +56,7 @@ class UpdateIncidentCommandHandler */ public function handle(UpdateIncidentCommand $command) { - if ($template = IncidentTemplate::where('slug', $command->template)->first()) { + if ($template = IncidentTemplate::where('slug', '=', $command->template)->first()) { $command->message = $this->parseTemplate($template, $command); } diff --git a/app/Bus/Handlers/Commands/Metric/AddMetricPointCommandHandler.php b/app/Bus/Handlers/Commands/Metric/AddMetricPointCommandHandler.php index 17b6dade..90e2f5f0 100644 --- a/app/Bus/Handlers/Commands/Metric/AddMetricPointCommandHandler.php +++ b/app/Bus/Handlers/Commands/Metric/AddMetricPointCommandHandler.php @@ -63,7 +63,7 @@ class AddMetricPointCommandHandler protected function findOrCreatePoint(AddMetricPointCommand $command) { $buffer = Carbon::now()->subMinutes($command->metric->threshold); - $point = MetricPoint::where('metric_id', $command->metric->id)->where('value', $command->value)->where('created_at', '>=', $buffer)->first(); + $point = MetricPoint::where('metric_id', '=', $command->metric->id)->where('value', '=', $command->value)->where('created_at', '>=', $buffer)->first(); if ($point) { return $point; diff --git a/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php b/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php index c51ee01e..dba6948f 100644 --- a/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php +++ b/app/Bus/Handlers/Commands/Subscriber/SubscribeSubscriberCommandHandler.php @@ -36,7 +36,7 @@ class SubscribeSubscriberCommandHandler */ public function handle(SubscribeSubscriberCommand $command) { - if ($subscriber = Subscriber::where('email', $command->email)->first()) { + if ($subscriber = Subscriber::where('email', '=', $command->email)->first()) { return $subscriber; } diff --git a/app/Foundation/Providers/EventServiceProvider.php b/app/Foundation/Providers/EventServiceProvider.php index bf808404..0bdee120 100644 --- a/app/Foundation/Providers/EventServiceProvider.php +++ b/app/Foundation/Providers/EventServiceProvider.php @@ -16,7 +16,7 @@ use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvi class EventServiceProvider extends ServiceProvider { /** - * The event handler mappings for the application. + * The event listener mappings for the application. * * @var array */ diff --git a/app/Http/Controllers/Dashboard/ApiController.php b/app/Http/Controllers/Dashboard/ApiController.php index 1c0d7989..d838bad8 100644 --- a/app/Http/Controllers/Dashboard/ApiController.php +++ b/app/Http/Controllers/Dashboard/ApiController.php @@ -119,7 +119,7 @@ class ApiController extends AbstractApiController { $templateSlug = Binput::get('slug'); - if ($template = IncidentTemplate::where('slug', $templateSlug)->first()) { + if ($template = IncidentTemplate::where('slug', '=', $templateSlug)->first()) { return $template; } diff --git a/app/Http/Controllers/Dashboard/IncidentController.php b/app/Http/Controllers/Dashboard/IncidentController.php index b1101603..3c3b44c9 100644 --- a/app/Http/Controllers/Dashboard/IncidentController.php +++ b/app/Http/Controllers/Dashboard/IncidentController.php @@ -100,7 +100,7 @@ class IncidentController extends Controller return View::make('dashboard.incidents.add') ->withPageTitle(trans('dashboard.incidents.add.title').' - '.trans('dashboard.dashboard')) ->withComponentsInGroups(ComponentGroup::with('components')->get()) - ->withComponentsOutGroups(Component::where('group_id', 0)->get()) + ->withComponentsOutGroups(Component::where('group_id', '=', 0)->get()) ->withIncidentTemplates(IncidentTemplate::all()); } @@ -236,7 +236,7 @@ class IncidentController extends Controller ->withPageTitle(trans('dashboard.incidents.edit.title').' - '.trans('dashboard.dashboard')) ->withIncident($incident) ->withComponentsInGroups(ComponentGroup::with('components')->get()) - ->withComponentsOutGroups(Component::where('group_id', 0)->get()); + ->withComponentsOutGroups(Component::where('group_id', '=', 0)->get()); } /** diff --git a/app/Http/Controllers/Dashboard/SettingsController.php b/app/Http/Controllers/Dashboard/SettingsController.php index 62f2ffe6..999a377a 100644 --- a/app/Http/Controllers/Dashboard/SettingsController.php +++ b/app/Http/Controllers/Dashboard/SettingsController.php @@ -200,7 +200,7 @@ class SettingsController extends Controller { $this->subMenu['security']['active'] = true; - $unsecureUsers = User::whereNull('google_2fa_secret')->orWhere('google_2fa_secret', '')->get(); + $unsecureUsers = User::whereNull('google_2fa_secret')->orWhere('google_2fa_secret', '=', '')->get(); Session::flash('redirect_to', $this->subMenu['security']['url']); diff --git a/app/Http/Controllers/SubscribeController.php b/app/Http/Controllers/SubscribeController.php index 9498871d..f630a2c5 100644 --- a/app/Http/Controllers/SubscribeController.php +++ b/app/Http/Controllers/SubscribeController.php @@ -89,7 +89,7 @@ class SubscribeController extends Controller throw new NotFoundHttpException(); } - $subscriber = Subscriber::where('verify_code', $code)->first(); + $subscriber = Subscriber::where('verify_code', '=', $code)->first(); if (!$subscriber) { throw new BadRequestHttpException(); @@ -149,7 +149,7 @@ class SubscribeController extends Controller $subscriber = Subscriber::where('verify_code', '=', $code)->first(); $usedComponentGroups = Component::enabled()->where('group_id', '>', 0)->groupBy('group_id')->pluck('group_id'); $componentGroups = ComponentGroup::whereIn('id', $usedComponentGroups)->orderBy('order')->get(); - $ungroupedComponents = Component::enabled()->where('group_id', 0)->orderBy('order')->orderBy('created_at')->get(); + $ungroupedComponents = Component::enabled()->where('group_id', '=', 0)->orderBy('order')->orderBy('created_at')->get(); if (!$subscriber) { throw new BadRequestHttpException(); diff --git a/app/Presenters/IncidentPresenter.php b/app/Presenters/IncidentPresenter.php index 87ff36fb..a552f578 100644 --- a/app/Presenters/IncidentPresenter.php +++ b/app/Presenters/IncidentPresenter.php @@ -269,8 +269,6 @@ class IncidentPresenter extends BasePresenter implements Arrayable public function duration() { if ($update = $this->latest()) { - dd($update->created_at->diffInSeconds($this->wrappedObject->created_at)); - return $this->wrappedObject->created_at->diffInSeconds($update->created_at); } diff --git a/app/Settings/Repository.php b/app/Settings/Repository.php index 4f3fdcd9..35cf79e9 100644 --- a/app/Settings/Repository.php +++ b/app/Settings/Repository.php @@ -81,7 +81,7 @@ class Repository $this->stale = true; if ($value === null) { - $this->model->where('name', $name)->delete(); + $this->model->where('name', '=', $name)->delete(); } else { $this->model->updateOrCreate(compact('name'), compact('value')); } @@ -97,7 +97,7 @@ class Repository */ public function get($name, $default = null) { - if ($setting = $this->model->where('name', $name)->first()) { + if ($setting = $this->model->where('name', '=', $name)->first()) { return $this->castSetting($name, $setting->value); } @@ -115,7 +115,7 @@ class Repository { $this->stale = true; - $this->model->where('name', $name)->delete(); + $this->model->where('name', '=', $name)->delete(); } /**