Passed
Branch master (79d24d)
by Johannes
02:27
created

LazyLoadingDriver   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A loadMetadataForClass() 0 4 1
A __construct() 0 5 1
1
<?php
2
3
namespace Metadata\Driver;
4
5
use Symfony\Component\DependencyInjection\ContainerInterface;
0 ignored issues
show
introduced by
Copyright notice missing
Loading history...
6
7
class LazyLoadingDriver implements DriverInterface
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
8
{
9
    private $container;
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
10
    private $realDriverId;
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
11
12
    public function __construct(ContainerInterface $container, $realDriverId)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
13
    {
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
14
        $this->container = $container;
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
15
        $this->realDriverId = $realDriverId;
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
16
    }
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
17
18
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$class" missing
Loading history...
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
19
     * {@inheritDoc}
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
20
     */
0 ignored issues
show
introduced by
Missing @return tag in function comment
Loading history...
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
21
    public function loadMetadataForClass(\ReflectionClass $class)
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
22
    {
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
23
        return $this->container->get($this->realDriverId)->loadMetadataForClass($class);
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
24
    }
0 ignored issues
show
introduced by
Tabs must be used to indent lines; spaces are not allowed
Loading history...
25
}
26