From cb3b294baad52ec94d63cf8ae2f96fd2dee50266 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 26 Oct 2017 22:54:07 -0700 Subject: [PATCH] Clesned up status label model for code quality --- app/Models/Statuslabel.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Models/Statuslabel.php b/app/Models/Statuslabel.php index c650521ca0..bfaba26c49 100755 --- a/app/Models/Statuslabel.php +++ b/app/Models/Statuslabel.php @@ -49,9 +49,10 @@ class Statuslabel extends SnipeModel return 'archived'; } elseif (($this->pending == '0') && ($this->archived == '0') && ($this->deployable == '0')) { return 'undeployable'; - } else { - return 'deployable'; } + + return 'deployable'; + } public function scopePending() @@ -78,6 +79,11 @@ class Statuslabel extends SnipeModel public static function getStatuslabelTypesForDB($type) { + + $statustype['pending'] = 0; + $statustype['deployable'] = 0; + $statustype['archived'] = 0; + if ($type == 'pending') { $statustype['pending'] = 1; $statustype['deployable'] = 0; @@ -92,12 +98,6 @@ class Statuslabel extends SnipeModel $statustype['pending'] = 0; $statustype['deployable'] = 0; $statustype['archived'] = 1; - - } else { - $statustype['pending'] = 0; - $statustype['deployable'] = 0; - $statustype['archived'] = 0; - } return $statustype;