Passed
Push — task/update-readme ( 5076c3...9ae954 )
by
unknown
14:56
created

ApplicationReview::review_decision()   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
c 0
b 0
f 0
dl 0
loc 2
rs 10
ccs 0
cts 2
cp 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use App\Models\JobApplication;
7
use App\Models\Lookup\ReviewStatus;
8
use App\Models\Lookup\ReviewDecision;
9
10
/**
11
 * Class AppliationReview
12
 *
13
 * @property int $id
14
 * @property int $job_application_id
15
 * @property int $review_status_id
16
 * @property string $notes
17
 * @property \Jenssegers\Date\Date $created_at
18
 * @property \Jenssegers\Date\Date $updated_at
19
 *
20
 * @property \App\Models\JobApplication $job_application
21
 * @property \App\Models\Lookup\ReviewStatus $review_status
22
 *
23
 * Accessors:
24
 * @property string $status
25
 **/
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...
26
class ApplicationReview extends Model
27
{
28
    protected $fillable = [
29
        'review_status_id',
30
        'notes',
31
    ];
32
33
    /**
34
     * The accessors to append to the model's array form.
35
     *
36
     * @var array
37
     */
38
    protected $with = ['review_status'];
39
40
    public function job_application() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function job_application()
Loading history...
Coding Style introduced by
Public method name "ApplicationReview::job_application" is not in camel caps format
Loading history...
41
        return $this->belongsTo(JobApplication::class);
42
    }
43
44
    public function review_status() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function review_status()
Loading history...
Coding Style introduced by
Public method name "ApplicationReview::review_status" is not in camel caps format
Loading history...
45
        return $this->belongsTo(ReviewStatus::class);
46
    }
47
48
    public function getStatusAttribute() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function getStatusAttribute()
Loading history...
49
        return $this->review_status->translation;
50
    }
51
}
52