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

Criteria::application_micro_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:27 +0000.
6
 */
0 ignored issues
show
Coding Style introduced by
Missing @link tag in file comment
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @package tag in file comment
Loading history...
Coding Style introduced by
Missing @license tag in file comment
Loading history...
7
8
namespace App\Models;
9
10
/**
11
 * Class Criteria
12
 *
13
 * @property int $id
14
 * @property int $criteria_type_id
15
 * @property int $job_poster_id
16
 * @property \Jenssegers\Date\Date $created_at
17
 * @property \Jenssegers\Date\Date $updated_at
18
 *
19
 * @property \App\Models\Lookup\CriteriaType $criteria_type
20
 * @property \App\Models\JobPoster $job_poster
21
 * @property \Illuminate\Database\Eloquent\Collection $application_work_samples
22
 * @property \Illuminate\Database\Eloquent\Collection $criteria_translations
23
 * @property \Illuminate\Database\Eloquent\Collection $skill_declarations
24
 *
25
 * Localized properties
26
 * @property string $name
27
 * @property string $description
28
 */
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...
29
class Criteria 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...
30
31
    use \Dimsav\Translatable\Translatable;
0 ignored issues
show
introduced by
The trait Dimsav\Translatable\Translatable requires some properties which are not provided by App\Models\Criteria: $translations, $useTranslationFallback, $translationModel, $localeKey, $translationForeignKey
Loading history...
32
33
    protected $table = 'criteria';
34
    public $translatedAttributes = ['name', 'description'];
35
    protected $casts = [
36
        'criteria_type_id' => 'int',
37
        'job_poster_id' => 'int'
38
    ];
39
    protected $fillable = [
40
        'criteria_type_id',
41
        'job_poster_id'
42
    ];
43
    protected $with = [
44
        'criteria_type'
45
    ];
46
47
    public function criteria_type() {
0 ignored issues
show
Coding Style introduced by
Public method name "Criteria::criteria_type" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function criteria_type()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
48
        return $this->belongsTo(\App\Models\Lookup\CriteriaType::class);
49
    }
50
51
    public function job_poster() {
0 ignored issues
show
Coding Style introduced by
Public method name "Criteria::job_poster" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function job_poster()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
52
        return $this->belongsTo(\App\Models\JobPoster::class);
53
    }
54
55
    public function application_work_samples() {
0 ignored issues
show
Coding Style introduced by
Public method name "Criteria::application_work_samples" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function application_work_samples()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
56
        return $this->hasMany(\App\Models\ApplicationWorkSample::class, 'criteria_id');
57
    }
58
59
    public function criteria_translations() {
0 ignored issues
show
Coding Style introduced by
Public method name "Criteria::criteria_translations" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function criteria_translations()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
60
        return $this->hasMany(\App\Models\CriteriaTranslation::class, 'criteria_id');
61
    }
62
63
    public function skill_declarations() {
0 ignored issues
show
Coding Style introduced by
Public method name "Criteria::skill_declarations" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function skill_declarations()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
64
        return $this->hasMany(\App\Models\SkillDeclaration::class, 'criteria_id');
65
    }
66
67
}
68