Completed
Push — master ( 939cff...94561e )
by Amine
21:29
created

Product::getId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace AmineBenHariz\TunisianetScraper\Entity;
4
5
/**
6
 * Class Product
7
 * @package AmineBenHariz\TunisianetScraper\Entity
8
 */
9
class Product
10
{
11
    /**
12
     * @var int
13
     */
14
    private $id;
15
16
    /**
17
     * @var string
18
     */
19
    private $title;
20
21
    /**
22
     * @var string
23
     */
24
    private $reference;
25
26
    /**
27
     * @var string
28
     */
29
    private $description;
30
31
    /**
32
     * @var float
33
     */
34
    private $price;
35
36
    /**
37
     * @var bool
38
     */
39
    private $available;
40
41
    /**
42
     * @var string
43
     */
44
    private $url;
45
46
    /**
47
     * Product constructor.
48
     * @param int $id
49
     * @param string $title
50
     * @param string $reference
51
     * @param string $description
52
     * @param float $price
53
     * @param bool $available
54
     * @param string $url
55
     */
56
    public function __construct($id, $title, $reference, $description, $price, $available, $url)
57
    {
58
        $this->id = $id;
59
        $this->title = $title;
60
        $this->reference = $reference;
61
        $this->description = $description;
62
        $this->price = $price;
63
        $this->available = $available;
64
        $this->url = $url;
65
    }
66
67
68
    /**
69
     * @return string
70
     */
71
    public function getTitle()
72
    {
73
        return $this->title;
74
    }
75
76
    /**
77
     * @return string
78
     */
79
    public function getReference()
80
    {
81
        return $this->reference;
82
    }
83
84
    /**
85
     * @return string
86
     */
87
    public function getDescription()
88
    {
89
        return $this->description;
90
    }
91
92
    /**
93
     * @return float
94
     */
95
    public function getPrice()
96
    {
97
        return $this->price;
98
    }
99
100
    /**
101
     * @return boolean
102
     */
103
    public function isAvailable()
104
    {
105
        return $this->available;
106
    }
107
108
    /**
109
     * @return string
110
     */
111
    public function getUrl()
112
    {
113
        return $this->url;
114
    }
115
116
    /**
117
     * @return int
118
     */
119
    public function getId()
120
    {
121
        return $this->id;
122
    }
123
}
124