Phone   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A persons() 0 4 1
A users() 0 4 1
1
<?php
2
3
namespace Telefonica\Models\Digital;
4
5
use Pedreiro\Models\Base;
6
use Muleta\Traits\Models\ComplexRelationamentTrait;
7
8
class Phone extends Base
9
{
10
11
    /**
12
     * The attributes that are mass assignable.
13
     *
14
     * @var array
15
     */
16
    protected $fillable = [
17
        'number',
18
    ];
19
20
    protected $mappingProperties = array(
21
        /**
22
         * User Info
23
         */
24
        'number' => [
25
            'type' => 'string',
26
            "analyzer" => "standard",
27
        ],
28
    );
29
    
30
    /**
31
     * Get all of the slaves that are assigned this tag.
32
     */
33
    public function persons()
34
    {
35
        return $this->morphedByMany(\Illuminate\Support\Facades\Config::get('sitec.core.models.person', \Telefonica\Models\Actors\Person::class), 'phoneable');
36
    }
37
38
    /**
39
     * Get all of the users that are assigned this tag.
40
     */
41
    public function users()
42
    {
43
        return $this->morphedByMany(\Illuminate\Support\Facades\Config::get('sitec.core.models.user', \App\Models\User::class), 'phoneable');
44
    }
45
}
46