Completed
Push — master ( ab7ebf...740609 )
by Grégoire
02:23
created

ExistingConnection   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 13
ccs 5
cts 5
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getConnection() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\Migrations\Configuration\Connection;
6
7
use Doctrine\DBAL\Connection;
8
9
final class ExistingConnection implements ConnectionLoader
10
{
11
    /** @var Connection */
12
    private $connection;
13
14 42
    public function __construct(Connection $connection)
15
    {
16 42
        $this->connection = $connection;
17 42
    }
18
19 37
    public function getConnection() : Connection
20
    {
21 37
        return $this->connection;
22
    }
23
}
24