GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

DateFormat::getFormat()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 2
b 0
f 0
nc 2
nop 0
dl 0
loc 7
ccs 0
cts 2
cp 0
crap 6
rs 10
1
<?php
2
3
namespace SleepingOwl\Admin\Traits;
4
5
trait DateFormat
6
{
7
    /**
8
     * @return string
9
     */
10
    public function getFormat()
11
    {
12
        if (is_null($this->format)) {
13
            $this->format = config('sleeping_owl.datetimeFormat');
0 ignored issues
show
Bug Best Practice introduced by
The property format does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
14
        }
15
16
        return $this->format;
17
    }
18
19
    /**
20
     * @return string
21
     */
22
    public function getTimezone()
23
    {
24
        if (is_null($this->timezone)) {
25
            $this->timezone = config('sleeping_owl.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...
26
        }
27
28
        return $this->timezone;
29
    }
30
31
    /**
32
     * @param string|null $format
33
     *
34
     * @return $this
35
     */
36
    public function setFormat($format)
37
    {
38
        $this->format = $format;
0 ignored issues
show
Bug Best Practice introduced by
The property format does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
39
40
        return $this;
41
    }
42
43
    /**
44
     * @param string $timezone
45
     *
46
     * @return $this
47
     */
48
    public function setTimezone($timezone)
49
    {
50
        $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...
51
52
        return $this;
53
    }
54
}
55