Completed
Push — master ( f6dbaa...824977 )
by ARCANEDEV
04:16
created

Session::hasReferer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php namespace Arcanesoft\Tracker\Models;
2
3
use Arcanedev\LaravelTracker\Models\Session as BaseSession;
4
5
/**
6
 * Class     Session
7
 *
8
 * @package  Arcanesoft\Tracker\Models
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class Session extends BaseSession
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Traits
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    use Presenters\SessionPresenter;
18
19
    /* ------------------------------------------------------------------------------------------------
20
     |  Check Functions
21
     | ------------------------------------------------------------------------------------------------
22
     */
23
    /**
24
     * Check if the user exists.
25
     *
26
     * @return bool
27
     */
28
    public function hasUser()
29
    {
30
        return ! is_null($this->user);
31
    }
32
33
    /**
34
     * Check if the referer exists.
35
     *
36
     * @return bool
37
     */
38
    public function hasReferer()
39
    {
40
        return ! is_null($this->referer);
41
    }
42
}
43