Collaborator::user()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * @todo Analisar, provavelmente tera que sair
4
 */
5
6
namespace Telefonica\Models\Actors\Business;
7
8
use Pedreiro\Models\Base;
9
use Telefonica\Models\Actors\Person;
10
11 View Code Duplication
class Collaborator extends Person
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
14
    protected $organizationPerspective = true;
15
16
    protected $table = 'business_collaborators';       
17
18
    /**
19
     * The attributes that are mass assignable.
20
     *
21
     * @var array
22
     */
23
    protected $fillable = [
24
        'user_id',
25
        'person_id',
26
        'business_id',
27
        'business_collaborator_type_id',
28
    ];
29
30
31
    protected $mappingProperties = array(
32
33
        'customer_id' => [
34
            'type' => 'integer',
35
            "analyzer" => "standard",
36
        ],
37
        'credit_card_id' => [
38
            'type' => 'integer',
39
            "analyzer" => "standard",
40
        ],
41
        'user_id' => [
42
            'type' => 'integer',
43
            "analyzer" => "standard",
44
        ],
45
        'score' => [
46
            'type' => 'float',
47
            "analyzer" => "standard",
48
        ],
49
    );
50
51
52
    public function user()
53
    {
54
        return $this->belongsTo(\Illuminate\Support\Facades\Config::get('sitec.core.models.user', \App\Models\User::class), 'user_id', 'id');
55
    }
56
57
}