Completed
Push — release/php7.2 ( 6615a6...2f8b7e )
by Grant
22:23 queued 16:18
created

Criteria   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 5
eloc 22
dl 0
loc 41
ccs 6
cts 10
cp 0.6
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A criteria_translations() 0 2 1
A job_poster() 0 2 1
A criteria_type() 0 2 1
A skill() 0 2 1
A skill_level() 0 2 1
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
use App\Models\Lookup\CriteriaTypeTranslation;
10
11
/**
12
 * Class Criteria
13
 *
14
 * @property int $id
15
 * @property int $criteria_type_id
16
 * @property int $job_poster_id
17
 * @property int $skill_id
18
 * @property int $skill_level_id
19
 * @property \Jenssegers\Date\Date $created_at
20
 * @property \Jenssegers\Date\Date $updated_at
21
 *
22
 * @property \App\Models\Lookup\CriteriaType $criteria_type
23
 * @property \App\Models\JobPoster $job_poster
24
 * @property \App\Models\Skill $skill
25
 * @property \App\Models\Lookup\SkillLevel $skill_level
26
 * @property \Illuminate\Database\Eloquent\Collection $criteria_translations
27
 *
28
 *  Localized Properties:
29
  * @property string $description
0 ignored issues
show
Coding Style introduced by
Expected 1 space(s) before asterisk; 2 found
Loading history...
30
 */
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...
31
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...
32
33
    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...
34
    public $translatedAttributes = ['description'];
35
36
    protected $table = 'criteria';
37
    protected $casts = [
38
        'criteria_type_id' => 'int',
39
        'job_poster_id' => 'int',
40
        'skill_id' => 'int',
41
        'skill_level_id' => 'int',
42
    ];
43
    protected $fillable = [
44
        'criteria_type_id',
45
        'skill_id',
46
        'skill_level_id',
47
    ];
48
    protected $with = [
49
        'criteria_type',
50
        'skill',
51
        'skill_level'
52
    ];
53
54 2
    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...
55 2
        return $this->belongsTo(\App\Models\Lookup\CriteriaType::class);
56
    }
57
58
    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...
59
        return $this->belongsTo(\App\Models\JobPoster::class);
60
    }
61
62 2
    public function skill() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function skill()
Loading history...
63 2
        return $this->belongsTo(\App\Models\Skill::class);
64
    }
65
66 2
    public function skill_level() {
0 ignored issues
show
Coding Style introduced by
Public method name "Criteria::skill_level" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function skill_level()
Loading history...
67 2
        return $this->belongsTo(\App\Models\Lookup\SkillLevel::class);
68
    }
69
70
    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...
71
        return $this->hasMany(\App\Models\Lookup\CriteriaTypeTranslation::class);
72
    }
73
74
}
75