Test Setup Failed
Push — master ( b9c0be...6a3b1f )
by Francimar
06:58
created

ControliD   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 2
dl 0
loc 25
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A qrcode() 0 4 1
A setStyle() 0 17 4
1
<?php
2
3
namespace Thermal\Profile;
4
5
use Thermal\Printer;
6
7
class ControliD extends Epson
8
{
9 1
    public function qrcode($data, $size)
10
    {
11 1
        $this->drawQrcode($data, $size);
12 1
    }
13
14 1
    protected function setStyle($style, $enable)
15
    {
16 1
        if ($enable) {
17
            // enable styles
18 1
            if (Printer::STYLE_BOLD == $style) {
19 1
                $this->getConnection()->write("\eE\x01");
20 1
                return $this;
21
            }
22
        } else {
23
            // disable styles
24 1
            if (Printer::STYLE_BOLD == $style) {
25 1
                $this->getConnection()->write("\eE\x00");
26 1
                return $this;
27
            }
28
        }
29 1
        return parent::setStyle($style, $enable);
30
    }
31
}
32