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 — master ( bfdf77...cc9ec9 )
by Simone
05:31 queued 02:38
created

MetaDataAdapter::getFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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