Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 0 |
1 | <?php |
||
46 | 6 | public function handleTransparency($newImage, $image) |
|
47 | { |
||
48 | // Get transparency color's index number |
||
49 | 6 | $transparency = $this->getTransparencyIndex($image); |
|
50 | |||
51 | // Is a strange index other than -1 set? |
||
52 | 6 | if ($transparency >= 0) { |
|
53 | |||
54 | // deal with alpha channels |
||
55 | $this->prepWithExistingIndex($newImage, $image, $transparency); |
||
56 | |||
57 | } else { |
||
58 | |||
59 | // deal with alpha channels |
||
60 | 6 | $this->prepTransparentPng($newImage); |
|
61 | } |
||
63 | } |