Test Failed
Pull Request — master (#160)
by Maximo
07:12
created

Factory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 14 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Canvas\Auth;
6
7
use Canvas\Models\Users;
8
9
class Factory
10
{
11
    /**
12
     * Create the Auth factory
13
     *
14
     * @param integer $ecosystem_auth
15
     * @return Auth
16
     */
17
    public static function create(bool $ecosystemAuth)
18
    {
19
        $user = null;
20
        switch ($ecosystemAuth) {
21
            case true:
22
                $user = new App();
23
                break;
24
            
25
            default:
26
                $user = new Users();
27
                break;
28
        }
29
30
        return $user;
31
    }
32
    
33
}