Passed
Pull Request — dev (#313)
by Tristan
06:51
created

Project::references()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * Created by Reliese Model.
5
 * Date: Thu, 12 Jul 2018 22:39:28 +0000.
6
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @package tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
Coding Style introduced by
Missing @license tag in file comment
Loading history...
Coding Style introduced by
Missing @link tag in file comment
Loading history...
7
8
namespace App\Models;
9
10
/**
11
 * Class Project
12
 *
13
 * @property int $id
14
 * @property string $name
15
 * @property \Jenssegers\Date\Date $start_date
16
 * @property \Jenssegers\Date\Date $end_date
17
 *
18
 * @property \Jenssegers\Date\Date $created_at
19
 * @property \Jenssegers\Date\Date $updated_at
20
 *
21
 * @property \Illuminate\Database\Eloquent\Collection $references
22
 */
0 ignored issues
show
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
23
class Project extends BaseModel {
0 ignored issues
show
Coding Style introduced by
Opening brace of a class must be on the line after the definition
Loading history...
24
25
    protected $casts = [
26
        'name' => 'string',
27
        'start_date' => 'date',
28
        'end_date' => 'date'
29
    ];
30
    protected $fillable = [
31
        'name',
32
        'start_date',
33
        'end_date'
34
    ];
35
36
    public function references() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function references()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
37
        return $this->belongsToMany(\App\Models\Reference::class);
38
    }
39
}
40