Fix issues with is_null

This commit is contained in:
James Brooks
2015-11-21 22:01:13 +00:00
parent bf88dfced0
commit 27f1e6b8a4
4 changed files with 24 additions and 8 deletions
@@ -88,7 +88,7 @@ class UpdateIncidentCommandHandler
*/
protected function filter(UpdateIncidentCommand $command)
{
return array_filter([
$params = [
'name' => $command->name,
'status' => $command->status,
'message' => $command->message,
@@ -96,7 +96,11 @@ class UpdateIncidentCommandHandler
'component_id' => $command->component_id,
'component_status' => $command->component_status,
'notify' => $command->notify,
], 'is_null');
];
return array_filter($params, function ($val) {
return $val !== null;
});
}
/**