Check where consistency
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user