Completed
Push — master ( e7a3c7...2372b5 )
by dan
02:03
created

Test/Adapter/DummyAdapter.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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 View Code Duplication
    public function format(NotificationInterface $notification)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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
}