Passed
Push — dev5a ( f24c41...668142 )
by Ron
10:56
created

GetEquipment   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAllEquipment() 0 12 2
1
<?php
2
3
namespace App\Domains\Equipment;
4
5
use App\SystemCategories;
6
use App\SystemTypes;
7
use Illuminate\Support\Facades\Auth;
8
use Illuminate\Support\Facades\Log;
9
10
11
class GetEquipment
12
{
13 6
    public function getAllEquipment($incCat = false)
14
    {
15 6
        if($incCat)
16
        {
17 4
            $list = SystemCategories::with('SystemTypes')->get();
18
        }
19
        else
20
        {
21 2
            $list = SystemTypes::all();
22
        }
23
24 6
        return $list;
25
    }
26
}
27