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.
Passed
Push — refactoring/metadata-adapter/2... ( 63cf14 )
by Simone
02:50
created

Adapter::getFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Mado\QueryBundle\Services;
4
5
use Doctrine\ORM\EntityRepository;
6
7
class Adapter
8
{
9
    private $metadata;
10
11
    private $entityName;
12
13 1
    public function setClassMetadata($metadata)
14
    {
15 1
        $this->metadata = $metadata;
16 1
    }
17
18 1
    public function setEntityName($entityName)
19
    {
20 1
        $this->entityName = $entityName;
21 1
    }
22
23 1
    public function getFields()
24
    {
25 1
        return array_keys($this->metadata->fieldMappings);
26
    }
27
28 1
    public function getEntityAlias()
29
    {
30 1
        $entityName = explode('\\', strtolower($this->entityName));
31
32 1
        $entityName = $entityName[count($entityName) - 1][0];
33
34 1
        return $entityName[0];
35
    }
36
}
37