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

LazyLoadingDriver::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
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