Conditions | 5 |
Paths | 5 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 8.125 |
Changes | 0 |
1 | <?php |
||
23 | 1 | public static function pdfXPosition($pdf, $value, $x, $align = null) |
|
24 | { |
||
25 | switch ($align) { |
||
26 | 1 | case 'center': |
|
27 | return $x - ($pdf->GetStringWidth($value) / 2); |
||
28 | 1 | case 'right': |
|
29 | $x = $x - $pdf->GetStringWidth($value); |
||
30 | if ($x < 0) { |
||
31 | $x = 0; |
||
32 | } |
||
33 | return $x; |
||
34 | 1 | case 'left': |
|
35 | default: |
||
36 | 1 | return $x; |
|
37 | } |
||
38 | } |
||
39 | |||
76 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.