Passed
Push — main ( 83bea6...22b11c )
by Thierry
01:32
created

DriverTrait   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 31
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setVersion() 0 3 1
A rows() 0 3 1
A connection() 0 3 1
1
<?php
2
3
namespace Lagdo\DbAdmin\Driver\Fake;
4
5
trait DriverTrait
6
{
7
    /**
8
     * @var Connection
9
     */
10
    protected $testConnection;
11
12
    /**
13
     * @return Connection
14
     */
15
    public function connection(): Connection
16
    {
17
        return $this->testConnection;
18
    }
19
20
    /**
21
     * @param string $version
22
     *
23
     * @return void
24
     */
25
    public function setVersion(string $version)
26
    {
27
        $this->testConnection->setServerInfo($version);
28
    }
29
30
    /**
31
     * @inheritDoc
32
     */
33
    public function rows(string $query)
34
    {
35
        return $this->testConnection->rows($query);
36
    }
37
}
38