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.

LosLogFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 24
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 12 1
1
<?php
2
namespace LosMiddleware\LosLog;
3
4
use Zend\ServiceManager\Factory\FactoryInterface;
5
6
class LosLogFactory implements FactoryInterface
7
{
8
    /**
9
     * @param \Interop\Container\ContainerInterface $container
10
     * @param string $requestedName
11
     * @param array|null $options
12
     * @return LosLog|object
13
     * @throws Exception\InvalidArgumentException
14
     * @throws \Psr\Container\ContainerExceptionInterface
15
     * @throws \Psr\Container\NotFoundExceptionInterface
16
     */
17
    public function __invoke(\Interop\Container\ContainerInterface $container, $requestedName, array $options = null)
18
    {
19
        $config = $container->get('config');
20
        $losConfig = $config['loslog'] ?? [];
21
22
        $logDir = $losConfig['log_dir'] ?? 'data/logs';
23
        $logFile = $losConfig['error_logger_file'] ?? 'error.log';
24
25
        $logger = AbstractLogger::generateFileLogger($logFile, $logDir);
26
27
        return new LosLog($logger);
28
    }
29
}
30