Completed
Push — master ( c45904...04afc3 )
by Iman
03:46
created

Authentication   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 13
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A loggedIn() 0 4 1
A beGuest() 0 4 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\Plugins\Conditions;
4
5
class Authentication
6
{
7
    public function beGuest($guard = null)
8
    {
9 2
        return function () use ($guard) {
10 2
            return auth($guard)->guest();
11 2
        };
12
    }
13
14
    public function loggedIn($guard = null)
15
    {
16 3
        return function () use ($guard) {
17 2
            return auth($guard)->check();
18 3
        };
19
    }
20
}
21