Passed
Pull Request — master (#610)
by John
05:33
created

Socialite::getAvailable()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 3
eloc 5
nc 3
nop 0
dl 0
loc 8
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace App\Models\Eloquent\Tool;
4
5
class Socialite
6
{
7
    protected static $config=['github', 'aauth'];
8
9
    public static function getAvailable() {
10
        $ret=[];
11
        foreach (self::$config as $conf) {
12
            if (config("services.$conf.enable")) {
13
                $ret[]=$conf;
14
            }
15
        }
16
        return $ret;
17
    }
18
}
19