Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4.016 |
Changes | 0 |
1 | <?php |
||
30 | 3 | public function getCellWidth($value, $fontSize) |
|
31 | { |
||
32 | 3 | $width = 1; |
|
33 | 3 | foreach ($this->getSingleCharacterArray($value) as $character) { |
|
34 | 3 | if (isset($this->characterSizes[$character])) { |
|
35 | $width += $this->characterSizes[$character]; |
||
36 | 3 | } elseif (strlen($character)) { |
|
37 | 3 | $width += 0.1 * $fontSize; |
|
38 | 3 | } |
|
39 | 3 | } |
|
40 | |||
41 | 3 | return $width; |
|
42 | } |
||
43 | |||
69 | } |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.