Passed
Push — task/common-translation-packag... ( 398328...094bed )
by Grant
07:16
created

WorkEnvironment::work_environment_translations()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Models;
4
5
use App\Models\BaseModel;
6
use Spatie\Translatable\HasTranslations;
7
8
/**
9
 * Class WorkEnvironment
10
 *
11
 * @property int $id
12
 * @property int $manager_id
13
 * @property int $telework_allowed_frequency_id
14
 * @property int $flexible_hours_frequency_id
15
 * @property \Jenssegers\Date\Date $created_at
16
 * @property \Jenssegers\Date\Date $updated_at
17
 *
18
 * @property \App\Models\Manager $manager
19
 * @property \App\Models\Lookup\Frequency $telework_allowed_frequency
20
 * @property \App\Models\Lookup\Frequency $flexible_hours_frequency
21
 * @property \Illuminate\Database\Eloquent\Collection $workplace_photo_captions
22
 *
23
 * Localized Properties:
24
 * @property string $things_to_know
25
 */
26
class WorkEnvironment extends BaseModel
27
{
28
    use HasTranslations;
29
30
    public $translatable = ['things_to_know'];
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
31
    protected $casts = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
32
        'telework_allowed_frequency_id' => 'int',
33
        'flexible_hours_frequency_id' => 'int',
34
    ];
35
    protected $fillable = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
36
        'telework_allowed_frequency_id',
37
        'flexible_hours_frequency_id'
38
    ];
39
    protected $with = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
40
        'telework_allowed_frequency',
41
        'flexible_hours_frequency'
42
    ];
43
44
    public function manager()
2 ignored issues
show
introduced by
Method \App\Models\WorkEnvironment::manager() 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 manager()
Loading history...
45
    {
46
        return $this->belongsTo(\App\Models\Manager::class);
47
    }
48
49
    public function telework_allowed_frequency() //phpcs:ignore
50
    {
51
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
52
    }
53
54
    public function flexible_hours_frequency() //phpcs:ignore
55
    {
56
        return $this->belongsTo(\App\Models\Lookup\Frequency::class);
57
    }
58
59
    public function workplace_photo_captions() //phpcs:ignore
60
    {
61
        return $this->hasMany(\App\Models\WorkplacePhotoCaption::class);
62
    }
63
}
64