Completed
Push — master ( ed1bf1...4880c8 )
by Chris
02:22 queued 59s
created

helpers.php ➔ isNotLumen()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
if (! function_exists('getModelForGuard')) {
4
    /**
5
     * @param string $guard
6
     *
7
     * @return string|null
8
     */
9
    function getModelForGuard(string $guard)
10
    {
11
        return collect(config('auth.guards'))
12
            ->map(function ($guard) {
13
                if (! isset($guard['provider'])) {
14
                    return;
15
                }
16
17
                return config("auth.providers.{$guard['provider']}.model");
18
            })->get($guard);
19
    }
20
}
21