Sitio   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 61
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A businesses() 0 4 1
A girls() 0 4 1
A users() 0 4 1
A videos() 0 4 1
1
<?php
2
3
namespace Telefonica\Models\Digital;
4
5
use Pedreiro\Models\Base;
6
7
class Sitio extends Base
8
{
9
10
    /**
11
     * The attributes that are mass assignable.
12
     *
13
     * @var array
14
     */
15
    protected $fillable = [
16
        'name',
17
        'url',
18
        'sitio_id'
19
    ];
20
21
    protected $mappingProperties = array(
22
        'name' => [
23
            'type' => 'string',
24
            "analyzer" => "standard",
25
        ],
26
        'url' => [
27
            'type' => 'string',
28
            "analyzer" => "standard",
29
        ],
30
        'sitio_id' => [
31
            'type' => 'string',
32
            "analyzer" => "standard",
33
        ],
34
    );
35
36
    /**
37
     * Get all of the businesses that are assigned this tag.
38
     */
39
    public function businesses()
40
    {
41
        return $this->morphedByMany(\Illuminate\Support\Facades\Config::get('sitec-tools.models.business', \Telefonica\Models\Actors\Business::class), 'sitioable');
42
    }
43
44
    /**
45
     * Get all of the girls that are assigned this tag.
46
     */
47
    public function girls()
48
    {
49
        return $this->morphedByMany('Population\Models\Market\Actors\Girl', 'sitioable');
50
    }
51
52
    /**
53
     * Get all of the users that are assigned this tag.
54
     */
55
    public function users()
56
    {
57
        return $this->morphedByMany(\Illuminate\Support\Facades\Config::get('sitec.core.models.user', \App\Models\User::class), 'sitioable');
58
    }
59
60
    /**
61
     * Aparece em videos
62
     */
63
    public function videos()
64
    {
65
        return $this->morphedByMany('Stalker\Models\Video', 'sitioable');
66
    }
67
}
68