Test Failed
Push — master ( a92e12...446184 )
by Domenico
04:27
created

CommandHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 22
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
1
<?php
2
/**
3
 *  This file is part of the Simple S3 package.
4
 *
5
 * (c) Mauro Cassani<https://github.com/mauretto78>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 */
11
12
namespace Matecat\SimpleS3\Commands;
13
14
use Matecat\SimpleS3\Client;
15
use Matecat\SimpleS3\Components\Logger\CommandHandlerLogger;
16
17
abstract class CommandHandler implements CommandHandlerInterface
18
{
19
    /**
20
     * @var Client
21
     */
22
    protected $client;
23
24
    /**
25
     * @var CommandHandlerLogger
26
     */
27
    protected $commandHandlerLogger;
28
29
    /**
30
     * CommandHandler constructor.
31
     *
32
     * @param Client $client
33
     */
34 41
    public function __construct(Client $client)
35
    {
36 41
        $this->client = $client;
37 41
        if ($this->client->hasLogger()) {
38 37
            $this->commandHandlerLogger = new CommandHandlerLogger($client->getLogger());
39
        }
40 41
    }
41
}
42