Passed
Push — dev5a ( 668142...386e30 )
by Ron
07:56
created

GetEquipDataFields   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 10
ccs 4
cts 4
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getAllFields() 0 3 1
A getFieldsForEquip() 0 3 1
1
<?php
2
3
namespace App\Domains\Equipment;
4
5
use App\SystemDataFields;
6
use App\SystemDataFieldTypes;
7
8
use Illuminate\Support\Facades\Auth;
9
use Illuminate\Support\Facades\Log;
10
11
12
class GetEquipDataFields
13
{
14 6
    public function getAllFields()
15
    {
16 6
        return SystemDataFieldTypes::all();
17
    }
18
19 10
    public function getFieldsForEquip($sysID)
20
    {
21 10
        return SystemDataFields::where('sys_id', $sysID)->orderBy('order')->get();
22
    }
23
}
24