Passed
Push — dev5a ( 386e30...9eb7a1 )
by Ron
07:53
created

GetEquipDataFields::getAllFieldsWithStats()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
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 4
    public function getAllFieldsWithStats()
20
    {
21 4
        $data = SystemDataFieldTypes::with('SystemDataFields.SystemTypes')->get();
22 4
        return $data;
23
    }
24
25 10
    public function getFieldsForEquip($sysID)
26
    {
27 10
        return SystemDataFields::where('sys_id', $sysID)->orderBy('order')->get();
28
    }
29
}
30