Passed
Pull Request — master (#610)
by John
06:15
created

Socialite   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
dl 0
loc 12
rs 10
c 1
b 0
f 1
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAvailable() 0 8 3
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