Completed
Push — master ( 797c9e...b671da )
by Matteo
02:15
created

ProvideInfo   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 8
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 44
rs 10

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getClientInfo() 0 4 1
A getHostInfo() 0 4 1
A getProtoInfo() 0 4 1
A getServerInfo() 0 6 1
A info() 0 4 1
A threadId() 0 4 1
A stat() 0 4 1
A ping() 0 4 1
1
<?php
2
3
namespace Mattbit\MysqlCompat\BridgeComponents;
4
5
trait ProvideInfo
6
{
7
    public function getClientInfo()
8
    {
9
        // @todo
10
    }
11
12
    public function getHostInfo()
13
    {
14
        // @todo
15
    }
16
17
    public function getProtoInfo()
18
    {
19
        // @todo
20
    }
21
22
    public function getServerInfo(Connection $linkIdentifier = null)
23
    {
24
        $connection = $this->manager->getOpenConnectionOrFail($linkIdentifier);
1 ignored issue
show
Bug introduced by
The property manager does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
25
26
        return $connection->getAttribute(PDO::ATTR_SERVER_VERSION);
27
    }
28
29
    public function info()
30
    {
31
        // @todo
32
    }
33
34
    public function threadId()
35
    {
36
        // @todo
37
    }
38
39
    public function stat()
40
    {
41
        // @todo
42
    }
43
44
    public function ping()
45
    {
46
        // @todo
47
    }
48
}
49