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 ( 3e93e2...04173f )
by Florian
03:09
created

DocumentToEntityMapper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 3
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getEntity() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the Stinger Entity Search package.
5
 *
6
 * (c) Oliver Kotte <[email protected]>
7
 * (c) Florian Meyer <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
namespace StingerSoft\EntitySearchBundle\Services\Mapping;
13
14
use Doctrine\Common\Persistence\ObjectManager;
15
use StingerSoft\EntitySearchBundle\Model\Document;
16
17
class DocumentToEntityMapper implements DocumentToEntityMapperInterface {
18
19
	/**
20
	 *
21
	 * {@inheritDoc}
22
	 *
23
	 * @see \StingerSoft\EntitySearchBundle\Services\Mapping\DocumentToEntityMapperInterface::getEntity()
24
	 */
25
	public function getEntity(ObjectManager $manager, Document $document) {
26
		return $manager->getRepository($document->getEntityClass())->find($document->getEntityId());
27
	}
28
}