Completed
Push — master ( 706182...8198d4 )
by Jérémy
01:34
created

Hub::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace JDecool\JsonFeed;
4
5
/**
6
 * A hub describes endpoints that can be used to subscribe to real-time notifications from the publisher of this feed.
7
 * Each object has a `type` and `url`, both of which are required.
8
 */
9
class Hub
10
{
11
    /** @var string */
12
    private $type;
13
14
    /** @var string */
15
    private $url;
16
17
    /**
18
     * Constructor
19
     *
20
     * @param string $type
21
     * @param string $url
22
     */
23
    public function __construct($type, $url)
24
    {
25
        $this->type = $type;
26
        $this->url = $url;
27
    }
28
29
    /**
30
     * Get hub type
31
     *
32
     * @return string
33
     */
34
    public function getType()
35
    {
36
        return $this->type;
37
    }
38
39
    /**
40
     * Get hub URL
41
     *
42
     * @return string
43
     */
44
    public function getUrl()
45
    {
46
        return $this->url;
47
    }
48
}
49