User   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A shop() 0 3 1
A __construct() 0 4 1
1
<?php 
2
3
namespace Hideyo\Ecommerce\Framework\Services\User\Entity;
4
5
6
use Laravel\Passport\HasApiTokens;
0 ignored issues
show
Bug introduced by
The type Laravel\Passport\HasApiTokens was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Illuminate\Notifications\Notifiable;
8
use Illuminate\Foundation\Auth\User as Authenticatable;
9
10
class User extends Authenticatable
11
{
12
13
    use HasApiTokens, Notifiable;
14
    
15
    /**
16
     * The database table used by the model.
17
     *
18
     * @var string
19
     */
20
    protected $table = 'user';
21
22
    /**
23
     * The attributes that are mass assignable.
24
     *
25
     * @var array
26
     */
27
    protected $fillable = ['username', 'email', 'password', 'confirmation_code'];
28
29
    /**
30
     * The attributes excluded from the model's JSON form.
31
     *
32
     * @var array
33
     */
34
    protected $hidden = ['password', 'remember_token'];
35
36
    public function __construct(array $attributes = array())
37
    {
38
        $this->table = $this->table;  
39
        parent::__construct($attributes);
40
    }
41
42
    public function shop()
43
    {
44
        return $this->belongsTo('Hideyo\Ecommerce\Framework\Services\Shop\Entity\Shop', 'selected_shop_id', 'id');
45
    }
46
}