Code Duplication    Length = 18-19 lines in 2 locations

lib/Cpdf.php 2 locations

@@ 1802-1819 (lines=18) @@
1799
                                $tmp .= ' ]';
1800
                                $info['ColorSpace'] = $tmp;
1801
1802
                                if (isset($options['transparency'])) {
1803
                                    $transparency = $options['transparency'];
1804
                                    switch ($transparency['type']) {
1805
                                        case 'indexed':
1806
                                            $tmp = ' [ ' . $transparency['data'] . ' ' . $transparency['data'] . '] ';
1807
                                            $info['Mask'] = $tmp;
1808
                                            break;
1809
1810
                                        case 'color-key':
1811
                                            $tmp = ' [ ' .
1812
                                                $transparency['r'] . ' ' . $transparency['r'] .
1813
                                                $transparency['g'] . ' ' . $transparency['g'] .
1814
                                                $transparency['b'] . ' ' . $transparency['b'] .
1815
                                                ' ] ';
1816
                                            $info['Mask'] = $tmp;
1817
                                            break;
1818
                                    }
1819
                                }
1820
                            } else {
1821
                                if (isset($options['transparency'])) {
1822
                                    $transparency = $options['transparency'];
@@ 1821-1839 (lines=19) @@
1818
                                    }
1819
                                }
1820
                            } else {
1821
                                if (isset($options['transparency'])) {
1822
                                    $transparency = $options['transparency'];
1823
1824
                                    switch ($transparency['type']) {
1825
                                        case 'indexed':
1826
                                            $tmp = ' [ ' . $transparency['data'] . ' ' . $transparency['data'] . '] ';
1827
                                            $info['Mask'] = $tmp;
1828
                                            break;
1829
1830
                                        case 'color-key':
1831
                                            $tmp = ' [ ' .
1832
                                                $transparency['r'] . ' ' . $transparency['r'] . ' ' .
1833
                                                $transparency['g'] . ' ' . $transparency['g'] . ' ' .
1834
                                                $transparency['b'] . ' ' . $transparency['b'] .
1835
                                                ' ] ';
1836
                                            $info['Mask'] = $tmp;
1837
                                            break;
1838
                                    }
1839
                                }
1840
                                $info['ColorSpace'] = '/' . $options['color'];
1841
                            }
1842
                        }