From 1327ea985e30952c6a0170a061434f6367d2ba3b Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sun, 9 Oct 2016 11:19:16 +0100 Subject: [PATCH 1/2] Truncate incident updates before seeding --- app/Console/Commands/DemoSeederCommand.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Console/Commands/DemoSeederCommand.php b/app/Console/Commands/DemoSeederCommand.php index c2025185..477e02b6 100644 --- a/app/Console/Commands/DemoSeederCommand.php +++ b/app/Console/Commands/DemoSeederCommand.php @@ -222,6 +222,7 @@ EINCIDENT; ]; Incident::truncate(); + IncidentUpdate::truncate(); foreach ($defaultIncidents as $defaultIncident) { $incident = Incident::create($defaultIncident); From f66ae54c158c28dbb6cdc47963bb349df2b59bc9 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Sun, 9 Oct 2016 12:35:15 +0100 Subject: [PATCH 2/2] Fix syntax in PHP 5.5 --- app/Settings/Repository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Settings/Repository.php b/app/Settings/Repository.php index 6b398bce..4f3fdcd9 100644 --- a/app/Settings/Repository.php +++ b/app/Settings/Repository.php @@ -26,7 +26,7 @@ class Repository * * @var string[] */ - const NOT_BOOL = [ + protected $notBooleans = [ 'app_incident_days', ]; @@ -154,7 +154,7 @@ class Repository return $value; } - if (!in_array($key, self::NOT_BOOL) && in_array($value, ['0', '1'])) { + if (!in_array($key, $this->notBooleans) && in_array($value, ['0', '1'])) { return (bool) $value; }