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.

DoctrineCargoRepositoryFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 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 - 8:29 PM
10
 */
11
declare(strict_types = 1);
12
13
namespace Codeliner\CargoBackend\Infrastructure\Container\Infrastructure;
14
15
use Codeliner\CargoBackend\Infrastructure\Persistence\Doctrine\DoctrineCargoRepository;
16
use Codeliner\CargoBackend\Model\Cargo\Cargo;
17
use Interop\Container\ContainerInterface;
18
19
/**
20
 * Class DoctrineCargoRepositoryFactory
21
 *
22
 * @package Codeliner\CargoBackend\Container\Infrastructure
23
 */
24
final class DoctrineCargoRepositoryFactory
25
{
26
    public function __invoke(ContainerInterface $container): DoctrineCargoRepository
27
    {
28
        $em = $container->get('doctrine.entitymanager.orm_default');
29
        return $em->getRepository(Cargo::class);
30
    }
31
}
32