User   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 38
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getUrl() 0 4 1
A profile() 0 4 1
1
<?php
2
3
namespace Magister\Models;
4
5
use Config;
6
use Magister\Services\Auth\Authenticable;
7
use Magister\Services\Contracts\Auth\Authenticable as AuthenticableContract;
8
use Magister\Services\Database\Elegant\Model;
9
10
/**
11
 * Class User.
12
 */
13
class User extends Model implements AuthenticableContract
14
{
15
    use Authenticable;
16
17
    /**
18
     * The primary key for the model.
19
     *
20
     * @var string
21
     */
22
    protected $primaryKey = 'Persoon.Id';
23
24
    /**
25
     * The attributes that should be mutated to dates.
26
     *
27
     * @var array
28
     */
29
    protected $dates = ['Geboortedatum'];
30
31
    /**
32
     * Get the url associated with the model.
33
     *
34
     * @return string
35
     */
36
    public function getUrl()
37
    {
38
        return Config::get('url.user');
39
    }
40
41
    /**
42
     * Get the user profile details.
43
     *
44
     * @return \Magister\Services\Database\Elegant\Model|static|null
45
     */
46
    public static function profile()
47
    {
48
        return static::first();
49
    }
50
}
51