Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
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 |