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
Push — master ( 619fa8...db31ee )
by Anderson
02:20
created

ElasticRepositoryManager::getRepository()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 6
nc 2
nop 2
1
<?php
2
3
namespace DoctrineElastic\Repository;
4
5
use DoctrineElastic\ElasticEntityManager;
6
7
/**
8
 * @author Ands
9
 */
10
class ElasticRepositoryManager {
11
12
    /** @var ElasticEntityRepository[] */
13
    protected $repositoryList;
14
15
    public function getRepository(ElasticEntityManager $entityManager, $className) {
16
        $hashKey = md5($className) . spl_object_hash($entityManager);
17
18
        if (!isset($this->repositoryList[$hashKey])) {
19
            $repository = new ElasticEntityRepository($entityManager, $className);
20
            $this->repositoryList[$hashKey] = $repository;
21
        }
22
23
        return $this->repositoryList[$hashKey];
24
    }
25
}