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

ApplicationReview   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
eloc 8
dl 0
loc 24
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A job_application() 0 2 1
A review_status() 0 2 1
A getStatusAttribute() 0 2 1
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