GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

StaticLogger::save()   A
last analyzed

Complexity

Conditions 4
Paths 3

Size

Total Lines 15
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.2
c 0
b 0
f 0
cc 4
eloc 7
nc 3
nop 3
1
<?php
2
3
namespace LosMiddleware\LosLog;
4
5
class StaticLogger extends AbstractLogger
6
{
7
    /**
8
     * @param mixed $message
9
     * @param string $logFile
10
     * @param string $logDir
11
     * @throws Exception\InvalidArgumentException
12
     */
13
    public static function save($message, $logFile = 'static.log', $logDir = 'data/logs')
14
    {
15
        if ($logFile == null) {
16
            // Useful for just Z-Ray logging
17
            return;
18
        }
19
20
        $logger = AbstractLogger::generateFileLogger($logFile, $logDir);
21
22
        if (is_object($message) && method_exists($message, 'losLogMe')) {
23
            $message = json_encode($message->losLogMe());
24
        }
25
26
        $logger->debug($message);
27
    }
28
}
29