Logger::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer\Logger;
9
10
use Deployer\Logger\Handler\HandlerInterface;
11
12
class Logger
13
{
14
    /**
15
     * @var HandlerInterface
16
     */
17
    private $handler;
18
19 11
    public function __construct(HandlerInterface $handler)
20
    {
21 11
        $this->handler = $handler;
22 11
    }
23
24 11
    public function log(string $message)
25
    {
26 11
        $this->handler->log("$message\n");
27 11
    }
28
}
29