Completed
Push — master ( 6c3b78...8b46fe )
by John
04:40
created

BarcodeBuilder   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 20
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A instantiateParser() 0 4 1
A instantiateRenderer() 0 4 1
1
<?php
2
3
namespace Graze\CiffRenderer\Field\Builder;
4
5
use Graze\CiffRenderer\Field\Builder\FixedTextBuilder;
6
use Graze\CiffRenderer\Field\Parser\BarcodeParser;
7
use Graze\CiffRenderer\Field\Renderer\BarcodeRenderer;
8
use Graze\CiffRenderer\Field\Parser\ParserInterface;
9
10
class BarcodeBuilder extends FixedTextBuilder
11
{
12
    /**
13
     * @return BarcodeRenderer
0 ignored issues
show
Documentation introduced by
Should the return type not be BarcodeParser?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
14
     */
15
    protected function instantiateParser()
16
    {
17
        return new BarcodeParser();
18
    }
19
20
    /**
21
     * @param ParserInterface $parser
22
     *
23
     * @return \Graze\CiffRenderer\Field\Renderer\RendererInterface
24
     */
25
    protected function instantiateRenderer(ParserInterface $parser)
26
    {
27
        return new BarcodeRenderer();
28
    }
29
}
30