| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | protected function getContentToPrint(): string |
||
| 22 | { |
||
| 23 | $doc = $_REQUEST[RequestParams::DOC]; |
||
| 24 | $markdownContentParser = MarkdownContentParserFacade::getInstance(); |
||
| 25 | try { |
||
| 26 | return $markdownContentParser->getContent($doc); |
||
| 27 | } catch (InvalidArgumentException $e) { |
||
| 28 | return sprintf( |
||
| 29 | '<p>%s</p>', |
||
| 30 | sprintf( |
||
| 31 | \__('Page \'%s\' does not exist', 'graphql-api'), |
||
| 32 | $doc |
||
| 33 | ) |
||
| 38 |