Completed
Push — master ( 77c2cb...59446e )
by Alessandro
9s
created

ConnectionEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
crap 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Facile\MongoDbBundle\Event;
6
7
use Symfony\Component\EventDispatcher\GenericEvent;
8
9
/**
10
 * Class ConnectionEvent.
11
 * @internal
12
 */
13
class ConnectionEvent extends GenericEvent
14
{
15
    const CLIENT_CREATED = 'facile_mongo_db.event.connection_client.created';
16
17
    /**
18
     * ConnectionEvent constructor.
19
     *
20
     * @param string $clientName
21
     * @param array  $arguments
22
     */
23 10
    public function __construct(string $clientName, array $arguments = [])
24
    {
25 10
        parent::__construct($clientName, $arguments);
26 10
    }
27
28
    /**
29
     * @return string
30
     */
31 9
    public function getClientName(): string
32
    {
33 9
        return $this->getSubject();
34
    }
35
}
36