Completed
Push — master ( 8c5cc3...01b1f4 )
by Francesco
02:33
created

ReportStatus::setStatus()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Audiens\AppnexusClient\entity;
4
5
/**
6
 * Class ReportStatus
7
 */
8
class ReportStatus extends ReportTicket
9
{
10
11
    use HydratableTrait;
12
13
    const STATUS_READY = 'ready';
14
15
    /** @var  string */
16
    protected $status;
17
18
    /** @var  string */
19
    protected $name;
20
21
    /** @var string */
22
    protected $url;
23
24
    /**
25
     * ReportStatus constructor.
26
     */
27
    public function __construct()
28
    {
29
        $this->report_id = null;
30
        $this->cached = false;
0 ignored issues
show
Documentation Bug introduced by
The property $cached was declared of type string, but false is of type false. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function getStatus()
37
    {
38
        return $this->status;
39
    }
40
41
    /**
42
     * @param string $status
43
     */
44
    public function setStatus($status)
45
    {
46
        $this->status = $status;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getName()
53
    {
54
        return $this->name;
55
    }
56
57
    /**
58
     * @param string $name
59
     */
60
    public function setName($name)
61
    {
62
        $this->name = $name;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getUrl()
69
    {
70
        return $this->url;
71
    }
72
73
    /**
74
     * @param string $url
75
     */
76
    public function setUrl($url)
77
    {
78
        $this->url = $url;
79
    }
80
81
    /**
82
     * @return bool
83
     */
84
    public function isReady()
85
    {
86
        return $this->status == self::STATUS_READY;
87
    }
88
}
89