Total Complexity | 6 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class GetEquipment |
||
13 | { |
||
14 | 6 | public function getAllEquipment($incCat = false) |
|
26 | } |
||
27 | |||
28 | 2 | public function getEquipmentArray() |
|
29 | { |
||
30 | 2 | $list = SystemTypes::orderBy('cat_id', 'ASC')->orderBy('name', 'ASC')->get(); |
|
31 | |||
32 | 2 | $newList = []; |
|
33 | 2 | foreach($list as $item) |
|
34 | { |
||
35 | 2 | $newList[] = [ |
|
36 | 2 | 'value' => $item->sys_id, |
|
37 | 2 | 'text' => $item->name, |
|
38 | ]; |
||
39 | } |
||
40 | |||
41 | 2 | return $newList; |
|
42 | } |
||
43 | |||
44 | 4 | public function getCatList() |
|
45 | { |
||
46 | 4 | return SystemCategories::all(); |
|
47 | } |
||
48 | |||
49 | 4 | public function getEquipmentData($sysID) |
|
52 | } |
||
53 | } |
||
54 |