Incident templates cleanup (#2182)

Clean up Incident Templates, supply incident array to them by default
This commit is contained in:
James Brooks
2016-10-14 08:03:19 +01:00
committed by GitHub
parent c2153512d9
commit fe96a00b82
14 changed files with 124 additions and 157 deletions
@@ -11,6 +11,12 @@
namespace CachetHQ\Cachet\Bus\Commands\Incident;
/**
* This is the report incident command.
*
* @author Joseph Cohen <joe@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
final class ReportIncidentCommand
{
/**
@@ -121,11 +127,11 @@ final class ReportIncidentCommand
* @param bool $stickied
* @param string|null $incident_date
* @param string|null $template
* @param array|null $template_vars
* @param array $template_vars
*
* @return void
*/
public function __construct($name, $status, $message, $visible, $component_id, $component_status, $notify, $stickied, $incident_date, $template, array $template_vars = null)
public function __construct($name, $status, $message, $visible, $component_id, $component_status, $notify, $stickied, $incident_date, $template, array $template_vars = [])
{
$this->name = $name;
$this->status = $status;
@@ -130,11 +130,11 @@ final class UpdateIncidentCommand
* @param bool $stickied
* @param string|null $incident_date
* @param string|null $template
* @param array|null $template_vars
* @param array $template_vars
*
* @return void
*/
public function __construct(Incident $incident, $name, $status, $message, $visible, $component_id, $component_status, $notify, $stickied, $incident_date, $template, array $template_vars = null)
public function __construct(Incident $incident, $name, $status, $message, $visible, $component_id, $component_status, $notify, $stickied, $incident_date, $template, array $template_vars = [])
{
$this->incident = $incident;
$this->name = $name;