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

BaseChannel   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 24
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A setAdapter() 0 4 1
A channelName() 0 4 1
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