LoggingService   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 3
dl 0
loc 11
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A log() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: famoser
5
 * Date: 14.11.2016
6
 * Time: 12:42
7
 */
8
9
namespace Famoser\XKCDCache\Services;
10
11
use Famoser\XKCDCache\Services\Base\BaseService;
12
use Famoser\XKCDCache\Services\Interfaces\LoggingServiceInterface;
13
14
/**
15
 * the logger service is concerned to save errors which occurred while the application is running
16
 *
17
 * @package Famoser\XKCDCache\Services
18
 */
19
class LoggingService extends BaseService implements LoggingServiceInterface
20
{
21
    /**
22
     * log your message
23
     *
24
     * @param $message
25
     */
26 5
    public function log($message)
27
    {
28 5
        $path = $this->getSettingService()->getLogFilePath();
29 5
        file_put_contents($path, $message, FILE_APPEND);
30
    }
31
}