Check where consistency

This commit is contained in:
James Brooks
2016-10-19 12:29:47 +01:00
parent 468b2a0b7a
commit 67b09af833
11 changed files with 14 additions and 16 deletions
@@ -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;
@@ -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);
}
@@ -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;
@@ -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;
}