Passed
Push — master ( 6c1980...4e24b5 )
by Alexey
03:34
created

UsersRenameNotifierListener   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 23
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A onAppUsersRenamed() 0 4 1
1
<?php
2
3
namespace Skobkin\Bundle\PointToolsBundle\EventListener;
4
5
6
use Skobkin\Bundle\PointToolsBundle\Service\Telegram\Notifier;
7
use Symfony\Component\EventDispatcher\GenericEvent;
8
9
class UsersRenameNotifierListener
10
{
11
    /**
12
     * @var Notifier
13
     */
14
    private $notifier;
15
16
17
    /**
18
     * UsersRenameNotifierListener constructor.
19
     *
20
     * @param Notifier $notifier
21
     */
22
    public function __construct(Notifier $notifier)
23
    {
24
        $this->notifier = $notifier;
25
    }
26
27
    public function onAppUsersRenamed(GenericEvent $event)
28
    {
29
        $this->notifier->sendUsersRenamedNotification((array) $event->getIterator());
30
    }
31
}