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

ConnectionEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getClientName() 0 4 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