Completed
Push — master ( 7cd9c2...0e7751 )
by dan
02:16
created

Broadcast::setPusherChannel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace IrishDan\NotificationBundle\Broadcast;
4
5
use IrishDan\NotificationBundle\Notification\NotifiableInterface;
6
use IrishDan\NotificationBundle\SlackableInterface;
7
8
class Broadcast implements BroadcastNotifiableInterface, NotifiableInterface, SlackableInterface
9
{
10
    protected $slackWebhook;
11
    protected $subscribedChannels = [
12
        'slack',
13
    ];
14
15
    public function setSlackWebhook($webhook)
16
    {
17
        $this->slackWebhook = $webhook;
18
    }
19
20
    public function getSlackWebhook()
21
    {
22
        return $this->slackWebhook;
23
    }
24
25
    public function setPusherChannel($channelName)
26
    {
27
        // TODO: Implement setPusherChannel() method.
28
    }
29
30
    public function getPusherChannel()
31
    {
32
        // TODO: Implement getPusherChannel() method.
33
    }
34
35
    public function getSubscribedChannels()
36
    {
37
        $this->subscribedChannels;
38
    }
39
40
    public function isSubscribedToChannel($channel)
41
    {
42
        return in_array($this->subscribedChannels, $channel);
43
    }
44
}