1 | <?php |
||
11 | final class XmlLegacyRenderer implements RendererInterface |
||
12 | { |
||
13 | /** |
||
14 | * |
||
15 | * @var XmlLegacyRenderer |
||
16 | */ |
||
17 | private static $myself; |
||
18 | |||
19 | /** |
||
20 | * |
||
21 | * @var XSLTProcessor |
||
22 | */ |
||
23 | private $xsltProcessor = null; |
||
24 | |||
25 | /** |
||
26 | * |
||
27 | * @var Config |
||
28 | */ |
||
29 | private $config; |
||
30 | |||
31 | 1 | public function __construct(Config $config) |
|
39 | |||
40 | /** |
||
41 | * |
||
42 | */ |
||
43 | 1 | private function initXsltProcessor() |
|
58 | |||
59 | /** |
||
60 | * |
||
61 | * @param string $input |
||
62 | * @return string |
||
63 | */ |
||
64 | 1 | public function render($input) |
|
83 | |||
84 | /** |
||
85 | * |
||
86 | * @param string $path |
||
87 | * @return string |
||
88 | */ |
||
89 | 1 | public static function imageUrl($path) |
|
97 | |||
98 | /** |
||
99 | * |
||
100 | * @param string $path |
||
101 | * @return string |
||
102 | */ |
||
103 | 1 | public static function linkUrl($path) |
|
111 | |||
112 | /** |
||
113 | * |
||
114 | * @todo OMG this method can't be efficient |
||
115 | * |
||
116 | * @param string $source |
||
117 | * @param string $language |
||
118 | * @return DOMElement? |
||
119 | */ |
||
120 | 1 | public static function highlight($source, $language) |
|
139 | } |
||
140 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.