Completed
Push — master ( 77fa1d...4c135b )
by ARCANEDEV
08:34
created

Query   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 36
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A arguments() 0 6 1
1
<?php namespace Arcanedev\LaravelTracker\Models;
2
3
/**
4
 * Class     Query
5
 *
6
 * @package  Arcanedev\LaravelTracker\Models
7
 * @author   ARCANEDEV <[email protected]>
8
 *
9
 * @property  int             id
10
 * @property  string          query
11
 * @property  \Carbon\Carbon  created_at
12
 * @property  \Carbon\Carbon  updated_at
13
 */
14
class Query extends Model
15
{
16
    /* ------------------------------------------------------------------------------------------------
17
     |  Properties
18
     | ------------------------------------------------------------------------------------------------
19
     */
20
    /**
21
     * The table associated with the model.
22
     *
23
     * @var string
24
     */
25
    protected $table = 'queries';
26
27
    /**
28
     * The attributes that are mass assignable.
29
     *
30
     * @var array
31
     */
32
    protected $fillable = ['query'];
33
34
    /* ------------------------------------------------------------------------------------------------
35
     |  Relationships
36
     | ------------------------------------------------------------------------------------------------
37
     */
38
    /**
39
     * The arguments relationship.
40
     *
41
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
42
     */
43 6
    public function arguments()
44
    {
45 6
        return $this->hasMany(
46 6
            $this->getConfig('models.query-argument', QueryArgument::class)
47 3
        );
48
    }
49
}
50