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

UsersRenameNotifierListener::onAppUsersRenamed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
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
}