FileHandler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A log() 0 4 1
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\Handler;
9
10
class FileHandler implements HandlerInterface
11
{
12
    /**
13
     * @var string
14
     */
15
    private $filePath;
16
17
    public function __construct(string $filePath)
18
    {
19
        $this->filePath = $filePath;
20
    }
21
22
    public function log(string $message)
23
    {
24
        file_put_contents($this->filePath, $message, FILE_APPEND);
25
    }
26
}
27