| Conditions | 6 |
| Paths | 32 |
| Total Lines | 26 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 6 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 33 | 259 | public static function convert(Style $style) |
|
| 34 | { |
||
| 35 | 259 | $options = array(); |
|
| 36 | |||
| 37 | 259 | if ($style->isBold()) { |
|
| 38 | 237 | $options[] = 'bold'; |
|
| 39 | } |
||
| 40 | |||
| 41 | 259 | if ($style->isBlinking()) { |
|
| 42 | 1 | $options[] = 'blink'; |
|
| 43 | } |
||
| 44 | |||
| 45 | 259 | if ($style->isUnderlined()) { |
|
| 46 | 231 | $options[] = 'underscore'; |
|
| 47 | } |
||
| 48 | |||
| 49 | 259 | if ($style->isInverse()) { |
|
| 50 | 1 | $options[] = 'reverse'; |
|
| 51 | } |
||
| 52 | |||
| 53 | 259 | if ($style->isHidden()) { |
|
| 54 | 2 | $options[] = 'conceal'; |
|
| 55 | } |
||
| 56 | |||
| 57 | 259 | return new OutputFormatterStyle($style->getForegroundColor(), $style->getBackgroundColor(), $options); |
|
| 58 | } |
||
| 59 | |||
| 64 |