| Conditions | 4 |
| Paths | 6 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 40 | 2 | public function getCellWidth($value, $isBold) |
|
| 41 | { |
||
| 42 | 2 | $width = 1; |
|
| 43 | 2 | foreach (str_split($value) as $character) { |
|
| 44 | 2 | if (isset($this->characterWidths[$character])) { |
|
| 45 | 2 | $width += $this->characterWidths[$character]; |
|
| 46 | 2 | } else { |
|
| 47 | 1 | $width += 0.66; |
|
| 48 | } |
||
| 49 | 2 | } |
|
| 50 | |||
| 51 | 2 | return $isBold ? $width * 1.09 : $width; |
|
| 52 | } |
||
| 53 | |||
| 64 |