Factory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 22
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0
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 false:
22
                $user = new App();
23
                break;
24
            
25
            default:
26
                $user = new Users();
27
                break;
28
        }
29
30
        return $user;
31
    }
32
    
33
}