Category::getId()   A
last analyzed

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 Category
7
 * @package AmineBenHariz\TunisianetScraper\Entity
8
 */
9
class Category
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 $url;
25
26
    /**
27
     * @var Product[]
28
     */
29
    private $products;
30
31
    /**
32
     * Category constructor.
33
     * @param int $id
34
     * @param string $title
35
     * @param string $url
36
     * @param Product[] $products
37
     */
38
    public function __construct($id, $title, $url, $products)
39
    {
40
        $this->id = $id;
41
        $this->title = $title;
42
        $this->url = $url;
43
        $this->products = $products;
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getTitle()
50
    {
51
        return $this->title;
52
    }
53
54
    /**
55
     * @return int
56
     */
57
    public function getId()
58
    {
59
        return $this->id;
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getUrl()
66
    {
67
        return $this->url;
68
    }
69
70
    /**
71
     * @return Product[]
72
     */
73
    public function getProducts()
74
    {
75
        return $this->products;
76
    }
77
}
78