Completed
Push — master ( 1494d2...398a9b )
by dan
02:07
created

BaseChannel::channelName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

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 2
nc 1
nop 0
1
<?php
2
3
namespace IrishDan\NotificationBundle\Channel;
4
5
use IrishDan\NotificationBundle\Adapter\MessageAdapterInterface;
6
7
abstract class BaseChannel implements ChannelInterface
8
{
9
    protected $channelEnabled;
10
    protected $channelConfiguration;
11
    protected $channel;
12
    protected $adapter;
13
14
    public function __construct($channelEnabled = true, array $channelConfiguration = [], $channel = '')
15
    {
16
        $this->channelEnabled = $channelEnabled;
17
        $this->channelConfiguration = $channelConfiguration;
18
        $this->channel = $channel;
19
    }
20
21
    public function setAdapter(MessageAdapterInterface $adapter)
22
    {
23
        $this->adapter = $adapter;
24
    }
25
26
    public function channelName()
27
    {
28
        return $this->channel;
29
    }
30
}
31