Passed
Push — task/job-page-performance ( d16cf8...6360ae )
by Chris
06:50 queued 12s
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 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
 */
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
 */
52
class Manager extends BaseModel {
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',
1 ignored issue
show
introduced by
Property \App\Models\Manager::$translatedAttributes does not have @var annotation.
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
57
        'division', 'position', 'work_experience', 'education','leadership_style',
58
        'employee_learning','expectations','education','career_journey','learning_path'];
59
    protected $casts = [
1 ignored issue
show
introduced by
Property \App\Models\Manager::$casts does not have @var annotation.
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
60
        'department_id' => 'int',
61
        'user_id' => 'int'
62
    ];
63
    protected $fillable = [
1 ignored issue
show
introduced by
Property \App\Models\Manager::$fillable does not have @var annotation.
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
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
75 18
    public function user() {
1 ignored issue
show
introduced by
Method \App\Models\Manager::user() 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 user()
Loading history...
76 18
        return $this->belongsTo(\App\Models\User::class);
77
    }
78
79 3
    public function department() {
1 ignored issue
show
introduced by
Method \App\Models\Manager::department() 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 department()
Loading history...
80 3
        return $this->belongsTo(\App\Models\Lookup\Department::class);
81
    }
82
83
    public function job_posters() {
1 ignored issue
show
Coding Style introduced by
Method name "Manager::job_posters" is not in camel caps format
Loading history...
introduced by
Method \App\Models\Manager::job_posters() 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_posters()
Loading history...
84
        return $this->hasMany(\App\Models\JobPoster::class);
85
    }
86
87 23
    public function work_environment() {
1 ignored issue
show
Coding Style introduced by
Method name "Manager::work_environment" is not in camel caps format
Loading history...
introduced by
Method \App\Models\Manager::work_environment() 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 work_environment()
Loading history...
88 23
        return $this->hasOne(\App\Models\WorkEnvironment::class)->withDefault();
89
    }
90
91 23
    public function team_culture() {
1 ignored issue
show
Coding Style introduced by
Method name "Manager::team_culture" is not in camel caps format
Loading history...
introduced by
Method \App\Models\Manager::team_culture() 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 team_culture()
Loading history...
92 23
        return $this->hasOne(\App\Models\TeamCulture::class)->withDefault();
93
    }
94
    /*
95
    * @property \App\Models\Lookup\Frequency $review_options
96
    * @property \App\Models\Lookup\Frequency $staylate
97
    * @property \App\Models\Lookup\Frequency $engage
98
    * @property \App\Models\Lookup\Frequency $opportunities
99
    * @property \App\Models\Lookup\Frequency $low_value_work_requests
100
    *
101
    * work_review_frequency
102
    * stay_late_frequency
103
    * engage_team_frequency
104
    * development_opportunity_frequency
105
    * refuse_low_value_work_frequency
106
    */
107
    public function work_review_frequency() {
1 ignored issue
show
Coding Style introduced by
Method name "Manager::work_review_frequency" is not in camel caps format
Loading history...
introduced by
Method \App\Models\Manager::work_review_frequency() does not have return type hint nor @return annotation for its return value.
Loading history...
Coding Style introduced by
You must use "/**" style comments for a function comment
Loading history...
108
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
109
    }
110
111
    public function stay_late_frequency() {
1 ignored issue
show
Coding Style introduced by
Method name "Manager::stay_late_frequency" is not in camel caps format
Loading history...
introduced by
Method \App\Models\Manager::stay_late_frequency() 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 stay_late_frequency()
Loading history...
112
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
113
    }
114
115
    public function engage_team_frequency() {
1 ignored issue
show
Coding Style introduced by
Method name "Manager::engage_team_frequency" is not in camel caps format
Loading history...
introduced by
Method \App\Models\Manager::engage_team_frequency() 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 engage_team_frequency()
Loading history...
116
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
117
    }
118
119
    public function development_opportunity_frequency() {
1 ignored issue
show
Coding Style introduced by
Method name "Manager::development_opportunity_frequency" is not in camel caps format
Loading history...
introduced by
Method \App\Models\Manager::development_opportunity_frequency() 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 development_opportunity_frequency()
Loading history...
120
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
121
    }
122
123
    public function refuse_low_value_work_frequency() {
1 ignored issue
show
Coding Style introduced by
Method name "Manager::refuse_low_value_work_frequency" is not in camel caps format
Loading history...
introduced by
Method \App\Models\Manager::refuse_low_value_work_frequency() 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 refuse_low_value_work_frequency()
Loading history...
124
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
125
    }
126
}
127