Passed
Pull Request — master (#36)
by
unknown
07:37
created

ModelTrait::setTimezone()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
3
namespace JamesMills\LaravelTimezone\Traits;
4
5
trait ModelTrait
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
        return $this;
23
    }
24
}
25