Completed
Push — master ( 3c03ca...d45e9e )
by Freek
02:07
created

helpers.php ➔ getModelForGuard()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 7
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @param string $guard
5
 *
6
 * @return string|null
7
 */
8 View Code Duplication
function getModelForGuard(string $guard)
0 ignored issues
show
Duplication introduced by
This function seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    return collect(config('auth.guards'))
11
        ->map(function ($guard) {
12
            return config("auth.providers.{$guard['provider']}.model");
13
        })->get($guard);
14
}
15