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

ModelTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTimezone() 0 3 1
A setTimezone() 0 4 1
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