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.
Completed
Pull Request — master (#28)
by Daniel
12:10
created

BookingServiceFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 13 1
1
<?php
2
/*
3
 * This file is part of the prooph/cargo-sample2.
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: 06.12.2015 - 9:48 PM
10
 */
11
declare(strict_types = 1);
12
13
namespace Codeliner\CargoBackend\Infrastructure\Container\Application\Booking;
14
15
use Codeliner\CargoBackend\Application\Booking\BookingService;
16
use Codeliner\CargoBackend\Infrastructure\Persistence\Transaction\TransactionManager;
17
use Codeliner\CargoBackend\Model\Cargo\CargoRepositoryInterface;
18
use Codeliner\CargoBackend\Model\Routing\RoutingServiceInterface;
19
use Interop\Container\ContainerInterface;
20
21
/**
22
 * Class BookingServiceFactory
23
 *
24
 * @package Codeliner\CargoBackend\Container\Booking
25
 */
26
final class BookingServiceFactory
27
{
28
    /**
29
     * @param ContainerInterface $container
30
     * @return BookingService
31
     */
32
    public function __invoke(ContainerInterface $container): BookingService
33
    {
34
        $config = $container->get('config');
35
36
        $locations = $config['locations']?? [];
37
38
        return new BookingService(
39
            $container->get(CargoRepositoryInterface::class),
40
            $container->get(TransactionManager::class),
41
            $container->get(RoutingServiceInterface::class),
42
            $locations
43
        );
44
    }
45
}
46