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::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 12
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 3
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