| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | public function getHtmlForWikiText($wikiText) |
||
| 44 | { |
||
| 45 | $endpoint = $this->configuration->getMediawikiWebServiceEndpoint(); |
||
| 46 | |||
| 47 | $parameters = array( |
||
| 48 | 'action' => 'parse', |
||
| 49 | 'pst' => true, |
||
| 50 | 'contentmodel' => 'wikitext', |
||
| 51 | 'disablelimitreport' => true, |
||
| 52 | 'disabletoc' => true, |
||
| 53 | 'disableeditsection' => true, |
||
| 54 | 'format' => 'php', |
||
| 55 | 'text' => $wikiText, |
||
| 56 | ); |
||
| 57 | |||
| 58 | $apiResult = $this->http->get($endpoint, $parameters); |
||
| 59 | $parseResult = unserialize($apiResult); |
||
| 60 | |||
| 61 | return $parseResult['parse']['text']['*']; |
||
| 62 | } |
||
| 63 | } |