Concrete5   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 31
ccs 0
cts 12
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A disconnect() 0 4 1
A connect() 0 4 1
1
<?php
2
3
namespace Buttress\Concrete\Client;
4
5
use Buttress\Concrete\Client\Connection\Connection;
6
use Buttress\Concrete\Client\Adapter\Adapter;
7
8
class Concrete5 implements Client
9
{
10
11
    protected $adapter;
12
13
    public function __construct(Adapter $adapter)
14
    {
15
        $this->adapter = $adapter;
16
    }
17
18
    /**
19
     * Attempt to disconnect
20
     * (This isn't going to be fully supported for awhile)
21
     *
22
     * @param \Buttress\Concrete\Client\Connection\Connection $connection
23
     * @return bool
24
     */
25
    public function disconnect(Connection $connection)
26
    {
27
        return $connection->disconnect();
28
    }
29
30
    /**
31
     * Get a connection to a concrete5 site
32
     * @return Connection
33
     */
34
    public function connect()
35
    {
36
        return $this->adapter->attach();
37
    }
38
}
39