FOSSology  4.4.0
Open Source License Compliance by Open Source Software
DecisionTypes.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2014, 2019-2020 Siemens AG
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
7 
8 namespace Fossology\Lib\Data;
9 
10 class DecisionTypes extends Types
11 {
12  const WIP = 0;
13  const TO_BE_DISCUSSED = 3;
14  const IRRELEVANT = 4;
15  const IDENTIFIED = 5;
16  const DO_NOT_USE = 6;
17  const NON_FUNCTIONAL = 7;
18 
19  public function __construct()
20  {
21  parent::__construct("decision type");
22 
23  $this->map = array(
24  self::TO_BE_DISCUSSED => "To be discussed",
25  self::IRRELEVANT => "Irrelevant",
26  self::IDENTIFIED => "Identified",
27  self::DO_NOT_USE => "Do not use",
28  self::NON_FUNCTIONAL => "Non functional"
29  );
30  }
31 
32  public function getConstantNameFromKey($key)
33  {
34  return array(
35  self::TO_BE_DISCUSSED => "TO_BE_DISCUSSED",
36  self::IRRELEVANT => "IRRELEVANT",
37  self::IDENTIFIED => "IDENTIFIED",
38  self::DO_NOT_USE => "DO_NOT_USE",
39  self::NON_FUNCTIONAL => "NON_FUNCTIONAL"
40  )[$key];
41  }
42 
43  public function getExtendedMap()
44  {
45  $map = $this->map;
46  $map[self::WIP] = 'Temporary';
47  return $map;
48  }
49 }