Test Failed
Push — master ( da5def...342071 )
by Christian
04:54
created

Mage   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 43.75%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 17
c 1
b 1
f 0
dl 0
loc 22
ccs 7
cts 16
cp 0.4375
rs 10
wmc 5

1 Method

Rating   Name   Duplication   Size   Complexity  
A domain() 0 20 5
1
<?php
2
3
namespace Omatech\Mage\Core;
4
5
use Exception;
6
7
class Mage
8
{
9 1
    public static function domain(string $domain)
10
    {
11 1
        switch ($domain) {
12 1
            case 'Permissions':
13
                $facade = app('mage.permissions');
14
                break;
15 1
            case 'Roles':
16
                $facade = app('mage.roles');
17
                break;
18 1
            case 'Users':
19
                $facade = app('mage.users');
20
                break;
21 1
            case 'Translations':
22
                $facade = app('mage.translations');
23
                break;
24
            default:
25 1
                throw new Exception();
26
        }
27
28
        return $facade;
29
    }
30
}
31