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

ControliD::qrcode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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