| Conditions | 4 |
| Paths | 6 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.0218 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 32 | 2 | public function getCellWidth($value, $bold) |
|
| 33 | { |
||
| 34 | 2 | $width = 1; |
|
| 35 | 2 | foreach (str_split($value) as $character) { |
|
| 36 | 2 | if (isset($this->characterWidths[$character])) { |
|
| 37 | 2 | $width += $this->characterWidths[$character]; |
|
| 38 | 2 | } else { |
|
| 39 | $width += 0.66; |
||
| 40 | } |
||
| 41 | 2 | } |
|
| 42 | |||
| 43 | 2 | return !$bold ? $width : $width * 1.1; |
|
| 44 | } |
||
| 45 | |||
| 54 |