Completed
Push — master ( 948dd8...416797 )
by Iman
09:03
created

Authentication   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

2 Methods

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