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.

MainFactory::__invoke()   A
last analyzed

Complexity

Conditions 4
Paths 8

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.2
cc 4
eloc 6
nc 8
nop 1
1
<?php
2
/*
3
 * This file is part of the prooph/php-ddd-cargo-sample.
4
 * (c) Alexander Miertsch <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 * 
9
 * Date: 8/8/15 - 4:42 PM
10
 */
11
namespace Codeliner\CargoUI\Container;
12
13
use Codeliner\CargoUI\Main;
14
use Codeliner\CargoUI\RiotCompiler;
15
use Interop\Container\ContainerInterface;
16
17
final class MainFactory
18
{
19
    /**
20
     * Create service
21
     *
22
     * @param ContainerInterface $container
23
     * @return mixed
24
     */
25
    public function __invoke(ContainerInterface $container)
26
    {
27
        $config = $container->get('config');
28
29
        $cacheEnabled = (isset($config['view']['cache']))? (bool)$config['view']['cache'] : false;
30
        $layout = (isset($config['view']['layout']) && is_string($config['view']['layout']))
31
            ? $config['view']['layout'] : 'CargoUI/view/layout/layout.phtml';
32
33
        return new Main($layout, $cacheEnabled, $container->get(RiotCompiler::class));
34
    }
35
}