Completed
Push — develop ( d59f23...c634b7 )
by Sergei
139:07 queued 74:08
created

ConnectionEventArgs::getDriver()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\DBAL\Event;
6
7
use Doctrine\Common\EventArgs;
8
use Doctrine\DBAL\Connection;
9
10
/**
11
 * Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.
12
 */
13
class ConnectionEventArgs extends EventArgs
14
{
15
    /** @var Connection */
16
    private $connection;
17
18
    public function __construct(Connection $connection)
19
    {
20
        $this->connection = $connection;
21 92
    }
22
23 92
    public function getConnection() : Connection
24 92
    {
25
        return $this->connection;
26
    }
27
}
28