Completed
Push — master ( 7bb44a...72105c )
by Laurent
02:19
created

Tab::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 *
4
 */
5
6
/**
7
 * A tab for card view
8
 *
9
 * @author Laurent De Coninck <[email protected]>
10
 */
11
class Tab
12
{
13
14
    /**
15
     * @var string
16
     */
17
    public $title;
18
19
    /**
20
     * @var string
21
     */
22
    public $name;
23
24
    /**
25
     * @var string
26
     */
27
    public $url;
28
29
    /**
30
     * Tab constructor.
31
     *
32
     * @param string $title
33
     * @param string $name
34
     * @param string $url
35
     */
36
    public function __construct($title, $name, $url)
37
    {
38
        $this->title = $title;
39
        $this->name = $name;
40
        $this->url = $url;
41
    }
42
43
    /**
44
     * @return array
45
     */
46
    public function toArray()
47
    {
48
        return [
49
            $this->url,
50
            $this->title,
51
            $this->name,
52
        ];
53
    }
54
}