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
Pull Request — 2.2 (#111)
by Simone
05:03 queued 02:33
created

MetaDataAdapter   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
dl 0
loc 28
ccs 12
cts 12
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getEntityAlias() 0 7 1
A getFields() 0 3 1
A setClassMetadata() 0 3 1
A setEntityName() 0 3 1
1
<?php
2
3
namespace Mado\QueryBundle\Services;
4
5
class MetaDataAdapter
6
{
7
    private $metadata;
8
9
    private $entityName;
10
11 1
    public function setClassMetadata($metadata)
12
    {
13 1
        $this->metadata = $metadata;
14 1
    }
15
16 1
    public function setEntityName($entityName)
17
    {
18 1
        $this->entityName = $entityName;
19 1
    }
20
21 1
    public function getFields()
22
    {
23 1
        return array_keys($this->metadata->fieldMappings);
24
    }
25
26 1
    public function getEntityAlias()
27
    {
28 1
        $entityName = explode('\\', strtolower($this->entityName));
29
30 1
        $entityName = $entityName[count($entityName) - 1][0];
31
32 1
        return $entityName[0];
33
    }
34
}
35