Passed
Push — master ( 2c3721...94fb22 )
by Grant
09:10 queued 10s
created

ApplicationReview::getDecisionAttribute()   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
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
 **/
26
class ApplicationReview extends Model
27
{
28
    protected $fillable = [
1 ignored issue
show
introduced by
Property \App\Models\ApplicationReview::$fillable does not have @var annotation.
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
29
        'review_status_id',
30
        'notes',
31
    ];
32
33
    /**
34
     * The accessors to append to the model's array form.
35
     *
36
     * @var array
0 ignored issues
show
introduced by
@var annotation of property \App\Models\ApplicationReview::$with does not specify type hint for its items.
Loading history...
37
     */
38
    protected $with = ['review_status'];
39
40
    public function job_application() {
1 ignored issue
show
Coding Style introduced by
Method name "ApplicationReview::job_application" is not in camel caps format
Loading history...
introduced by
Method \App\Models\ApplicationReview::job_application() does not have return type hint nor @return annotation for its return value.
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function job_application()
Loading history...
41
        return $this->belongsTo(JobApplication::class);
42
    }
43
44
    public function review_status() {
1 ignored issue
show
Coding Style introduced by
Method name "ApplicationReview::review_status" is not in camel caps format
Loading history...
introduced by
Method \App\Models\ApplicationReview::review_status() does not have return type hint nor @return annotation for its return value.
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function review_status()
Loading history...
45
        return $this->belongsTo(ReviewStatus::class);
46
    }
47
48
    public function getStatusAttribute() {
1 ignored issue
show
introduced by
Method \App\Models\ApplicationReview::getStatusAttribute() does not have return type hint nor @return annotation for its return value.
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function getStatusAttribute()
Loading history...
49
        return $this->review_status->translation;
50
    }
51
}
52