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   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A save() 0 15 4
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