Category   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 69
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 2
Metric Value
wmc 5
c 2
b 0
f 2
lcom 0
cbo 0
dl 0
loc 69
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getTitle() 0 4 1
A getId() 0 4 1
A getUrl() 0 4 1
A getProducts() 0 4 1
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