LoggingService::log()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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
}