Completed
Push — feature/screening-plan ( 46ccc1...3f87fd )
by Tristan
14:07 queued 07:47
created

Manager::job_posters()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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\TeamCulture;
10
11
/**
12
 * Class Manager
13
 *
14
 * @property int $id
15
 * @property int $department_id
16
 * @property int $work_review_frequency_id
17
 * @property int $stay_late_frequency_id
18
 * @property int $engage_team_frequency_id
19
 * @property int $development_opportunity_frequency_id
20
 * @property int $refuse_low_value_work_frequency_id
21
 * @property int $years_experience
22
 * @property string $twitter_username
23
 * @property string $linkedin_url
24
 * @property int $user_id
25
 * @property \Jenssegers\Date\Date $created_at
26
 * @property \Jenssegers\Date\Date $updated_at
27
 *
28
 * @property \App\Models\User $user
29
 * @property \App\Models\Lookup\Department $department
30
 * @property \Illuminate\Database\Eloquent\Collection $job_posters
31
 * @property \App\Models\WorkEnvironment $work_environment
32
 * @property \App\Models\TeamCulture $team_culture
33
 * @property \App\Models\Lookup\Frequency $work_review_frequency
34
 * @property \App\Models\Lookup\Frequency $stay_late_frequency
35
 * @property \App\Models\Lookup\Frequency $engage_team_frequency
36
 * @property \App\Models\Lookup\Frequency $development_opportunity_frequency
37
 * @property \App\Models\Lookup\Frequency $refuse_low_value_work_frequency
38
 *
39
 * Localized Properties:
40
 * @property string $about_me
41
 * @property string $greatest_accomplishment
42
 * @property string $branch
43
 * @property string $division
44
 * @property string $position
45
 * @property string $leadership_style
46
 * @property string $employee_learning
47
 * @property string $expectations
48
 * @property string $education
49
 * @property string $career_journey
50
 * @property string $learning_path
51
 */
0 ignored issues
show
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
52
class Manager 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...
53
54
    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\Manager: $translations, $useTranslationFallback, $translationModel, $localeKey, $translationForeignKey
Loading history...
55
56
    public $translatedAttributes = ['about_me', 'greatest_accomplishment', 'branch',
57
        'division', 'position', 'work_experience', 'education','leadership_style',
58
        'employee_learning','expectations','education','career_journey','learning_path'];
59
    protected $casts = [
60
        'department_id' => 'int',
61
        'user_id' => 'int'
62
    ];
63
    protected $fillable = [
64
        'department_id',
65
        'twitter_username',
66
        'linkedin_url',
67
        'work_review_frequency_id',
68
        'stay_late_frequency_id',
69
        'engage_team_frequency_id',
70
        'development_opportunity_frequency_id',
71
        'refuse_low_value_work_frequency_id',
72
        'years_experience'
73
    ];
74
    protected $with = [
75
        'department',
76
        'work_review_frequency',
77
        'stay_late_frequency',
78
        'engage_team_frequency',
79
        'development_opportunity_frequency',
80
        'refuse_low_value_work_frequency'
81
    ];
82
83 12
    public function user() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function user()
Loading history...
84 12
        return $this->belongsTo(\App\Models\User::class);
85
    }
86
87 14
    public function department() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function department()
Loading history...
88 14
        return $this->belongsTo(\App\Models\Lookup\Department::class);
89
    }
90
91 4
    public function job_posters() {
0 ignored issues
show
Coding Style introduced by
Public method name "Manager::job_posters" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function job_posters()
Loading history...
92 4
        return $this->hasMany(\App\Models\JobPoster::class);
93
    }
94
95
    public function work_environment() {
0 ignored issues
show
Coding Style introduced by
Public method name "Manager::work_environment" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function work_environment()
Loading history...
96
        return $this->hasOne(\App\Models\WorkEnvironment::class)->withDefault();
97
    }
98
99
    public function team_culture() {
0 ignored issues
show
Coding Style introduced by
Public method name "Manager::team_culture" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function team_culture()
Loading history...
100
        return $this->hasOne(\App\Models\TeamCulture::class)->withDefault();
101
    }
102
    /*
103
    * @property \App\Models\Lookup\Frequency $review_options
104
    * @property \App\Models\Lookup\Frequency $staylate
105
    * @property \App\Models\Lookup\Frequency $engage
106
    * @property \App\Models\Lookup\Frequency $opportunities
107
    * @property \App\Models\Lookup\Frequency $low_value_work_requests
108
    *
109
    * work_review_frequency
110
    * stay_late_frequency
111
    * engage_team_frequency
112
    * development_opportunity_frequency
113
    * refuse_low_value_work_frequency
114
    */
115 14
    public function work_review_frequency() {
0 ignored issues
show
Coding Style introduced by
Public method name "Manager::work_review_frequency" is not in camel caps format
Loading history...
Coding Style introduced by
You must use "/**" style comments for a function comment
Loading history...
116 14
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
117
    }
118
119 14
    public function stay_late_frequency() {
0 ignored issues
show
Coding Style introduced by
Public method name "Manager::stay_late_frequency" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function stay_late_frequency()
Loading history...
120 14
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
121
    }
122
123 14
    public function engage_team_frequency() {
0 ignored issues
show
Coding Style introduced by
Public method name "Manager::engage_team_frequency" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function engage_team_frequency()
Loading history...
124 14
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
125
    }
126
127 14
    public function development_opportunity_frequency() {
0 ignored issues
show
Coding Style introduced by
Public method name "Manager::development_opportunity_frequency" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function development_opportunity_frequency()
Loading history...
128 14
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
129
    }
130
131 14
    public function refuse_low_value_work_frequency() {
0 ignored issues
show
Coding Style introduced by
Public method name "Manager::refuse_low_value_work_frequency" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function refuse_low_value_work_frequency()
Loading history...
132 14
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
133
    }
134
}
135