Passed
Push — gb_postgres ( 973672...585579 )
by Tristan
06:59
created

WorkEnvironment   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
eloc 14
dl 0
loc 29
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A telework_allowed_frequency() 0 2 1
A flexible_hours_frequency() 0 2 1
A manager() 0 2 1
A workplace_photo_captions() 0 2 1
1
<?php
2
3
/**
4
 * Created by Reliese Model.
5
 * Date: Thu, 12 Jul 2018 22:39:28 +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\Frequency;
10
11
/**
12
 * Class WorkEnvironment
13
 *
14
 * @property int $id
15
 * @property int $manager_id
16
 * @property boolean $remote_work_allowed
17
 * @property int $telework_allowed_frequency_id
18
 * @property int $flexible_hours_frequency_id
19
 * @property \Jenssegers\Date\Date $created_at
20
 * @property \Jenssegers\Date\Date $updated_at
21
 *
22
 * @property \App\Models\Manager $manager
23
 * @property \App\Models\Lookup\Frequency $telework_allowed_frequency
24
 * @property \App\Models\Lookup\Frequency $flexible_hours_frequency
25
 * @property \Illuminate\Database\Eloquent\Collection $workplace_photo_captions
26
 */
0 ignored issues
show
Coding Style introduced by
Missing @link tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @package 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...
27
class WorkEnvironment 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...
28
29
    protected $casts = [
30
        'remote_work_allowed' => 'boolean'
31
    ];
32
    protected $fillable = [
33
        'remote_work_allowed',
34
        'telework_allowed_frequency_id',
35
        'flexible_hours_frequency_id'
36
    ];
37
    protected $with = [
38
        'telework_allowed_frequency',
39
        'flexible_hours_frequency'
40
    ];
41
42
    public function manager() {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on a new line
Loading history...
Coding Style introduced by
Missing doc comment for function manager()
Loading history...
43
        return $this->belongsTo(\App\Models\Manager::class);
44
    }
45
46
    public function telework_allowed_frequency() {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on a new line
Loading history...
Coding Style introduced by
Missing doc comment for function telework_allowed_frequency()
Loading history...
Coding Style introduced by
Public method name "WorkEnvironment::telework_allowed_frequency" is not in camel caps format
Loading history...
47
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
48
    }
49
50
    public function flexible_hours_frequency() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function flexible_hours_frequency()
Loading history...
Coding Style introduced by
Public method name "WorkEnvironment::flexible_hours_frequency" is not in camel caps format
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
51
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
52
    }
53
54
    public function workplace_photo_captions() {
0 ignored issues
show
Coding Style introduced by
Opening brace should be on a new line
Loading history...
Coding Style introduced by
Missing doc comment for function workplace_photo_captions()
Loading history...
Coding Style introduced by
Public method name "WorkEnvironment::workplace_photo_captions" is not in camel caps format
Loading history...
55
        return $this->hasMany(\App\Models\WorkplacePhotoCaption::class);
56
    }
57
58
}
59