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

BarcodeBuilder::instantiateRenderer()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
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