Completed
Push — master ( 6ee4e9...166b13 )
by dan
02:00
created

BaseChannel::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
namespace IrishDan\NotificationBundle\Channel;
4
5
use IrishDan\NotificationBundle\Formatter\MessageFormatterInterface;
6
use IrishDan\NotificationBundle\Dispatcher\MessageDispatcherInterface;
7
8
abstract class BaseChannel implements ChannelInterface
9
{
10
    protected $channelEnabled;
11
    protected $channelConfiguration;
12
    protected $channel;
13
    protected $formatter;
14
    protected $dispatcher;
15
16
    public function __construct($channelEnabled = true, array $channelConfiguration = [], $channel = '')
17
    {
18
        $this->channelEnabled       = $channelEnabled;
19
        $this->channelConfiguration = $channelConfiguration;
20
        $this->channel              = $channel;
21
    }
22
23
    public function setDispatcher(MessageDispatcherInterface $dispatcher)
24
    {
25
        $this->dispatcher = $dispatcher;
26
    }
27
28
    public function setDataFormatter(MessageFormatterInterface $formatter)
29
    {
30
        $this->formatter = $formatter;
31
    }
32
}
33