Completed
Push — master ( db8ff8...4137d9 )
by dan
01:59
created

DummyAdapter::getChannelName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace IrishDan\NotificationBundle\Test\Adapter;
4
5
use IrishDan\NotificationBundle\Adapter\BaseMessageAdapter;
6
use IrishDan\NotificationBundle\Adapter\MessageAdapterInterface;
7
use IrishDan\NotificationBundle\Message\MessageInterface;
8
use IrishDan\NotificationBundle\Notification\NotificationInterface;
9
10
class DummyAdapter extends BaseMessageAdapter implements MessageAdapterInterface
11
{
12
    public function format(NotificationInterface $notification)
13
    {
14
        $notification->setChannel($this->channelName);
15
        parent::format($notification);
16
17
        $dispatchData = [];
18
        $messageData = self::createMessagaData([]);
19
20
        return self::createMessage($dispatchData, $messageData, $this->channelName);
21
    }
22
23
    public function dispatch(MessageInterface $message)
24
    {
25
        return true;
26
    }
27
28
    public function getChannelName()
29
    {
30
        return $this->channelName;
31
    }
32
33
    public function getConfiguration()
34
    {
35
        return $this->configuration;
36
    }
37
}