Passed
Pull Request — master (#36)
by
unknown
09:03 queued 06:33
created

TimezoneModelTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setTimezone() 0 5 1
A getTimezone() 0 3 1
1
<?php
2
3
namespace JamesMills\LaravelTimezone\Traits;
4
5
trait TimezoneModelTrait
6
{
7
    /**
8
     * @return mixed
9
     */
10
    public function getTimezone()
11
    {
12
        return $this->timezone;
13
    }
14
15
    /**
16
     * @param  string  $timezone
17
     * @return $this
18
     */
19
    public function setTimezone(string $timezone)
20
    {
21
        $this->timezone = $timezone;
0 ignored issues
show
Bug Best Practice introduced by
The property timezone does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
22
23
        return $this;
24
    }
25
}
26