Failed Conditions
Push — master ( c35142...f185a6 )
by Guilherme
08:59
created

CacheMetadataBuilder   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 23
ccs 0
cts 12
cp 0
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A withComponentMetadata() 0 5 1
A build() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\ORM\Mapping\Builder;
6
7
use Doctrine\ORM\Annotation;
0 ignored issues
show
introduced by
Type Doctrine\ORM\Annotation is not used in this file.
Loading history...
8
use Doctrine\ORM\Mapping;
9
use function assert;
0 ignored issues
show
introduced by
Type assert is not used in this file.
Loading history...
10
use function constant;
0 ignored issues
show
introduced by
Type constant is not used in this file.
Loading history...
11
use function sprintf;
0 ignored issues
show
introduced by
Type sprintf is not used in this file.
Loading history...
12
use function str_replace;
0 ignored issues
show
introduced by
Type str_replace is not used in this file.
Loading history...
13
use function strtolower;
0 ignored issues
show
introduced by
Type strtolower is not used in this file.
Loading history...
14
use function strtoupper;
0 ignored issues
show
introduced by
Type strtoupper is not used in this file.
Loading history...
15
16
class CacheMetadataBuilder
0 ignored issues
show
Coding Style introduced by
Class name doesn't match filename; expected "class FieldMetadataBuilder"
Loading history...
17
{
18
    /** @var Mapping\ClassMetadataBuildingContext */
19
    private $metadataBuildingContext;
20
21
    /** @var Mapping\ClassMetadata */
22
    private $componentMetadata;
23
24
    public function __construct(Mapping\ClassMetadataBuildingContext $metadataBuildingContext)
25
    {
26
        $this->metadataBuildingContext = $metadataBuildingContext;
27
    }
28
29
    public function withComponentMetadata(Mapping\ClassMetadata $componentMetadata) : CacheMetadataBuilder
30
    {
31
        $this->componentMetadata = $componentMetadata;
32
33
        return $this;
34
    }
35
36
    public function build() : Mapping\FieldMetadata
37
    {
38
        return $fieldMetadata;
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $fieldMetadata seems to be never defined.
Loading history...
39
    }
40
}