Completed
Pull Request — master (#19)
by John
05:56 queued 03:42
created

FieldParserBarcode   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFontSize() 0 4 1
A getIsInverse() 0 4 1
1
<?php
2
3
namespace Graze\CiffRenderer\Parser\FieldParser;
4
5
use Graze\CiffRenderer\Parser\FieldParser\FieldParserInterface;
6
7
class FieldParserBarcode extends FieldParserFixedText implements FieldParserInterface
8
{
9
    /**
10
     * @return float
11
     */
12
    public function getFontSize()
13
    {
14
        return (float) $this->xmlField->Barcode->HR->HRFont->Pitch;
15
    }
16
17
    /**
18
     * @return bool
19
     */
20
    public function getIsInverse()
21
    {
22
        return (bool) (string) $this->xmlField->Inverse;
23
    }
24
}
25