IndentedCodeRenderer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 16
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 7 2
1
<?php namespace Todaymade\Daux\Format\Confluence\ContentTypes\Markdown;
2
3
use League\CommonMark\Block\Element\AbstractBlock;
4
use League\CommonMark\Block\Element\IndentedCode;
5
use League\CommonMark\ElementRendererInterface;
6
use League\CommonMark\HtmlElement;
7
8
class IndentedCodeRenderer extends CodeRenderer
9
{
10
    /**
11
     * @param AbstractBlock $block
12
     * @param HtmlRendererInterface $htmlRenderer
0 ignored issues
show
Bug introduced by Stéphane Goetz
The type Todaymade\Daux\Format\Co...n\HtmlRendererInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
13
     * @param bool $inTightList
14
     *
15
     * @return HtmlElement
16
     */
17
    public function render(AbstractBlock $block, ElementRendererInterface $htmlRenderer, $inTightList = false)
18
    {
19
        if (!($block instanceof IndentedCode)) {
20
            throw new \InvalidArgumentException('Incompatible block type: ' . get_class($block));
21
        }
22
23
        return $this->getHTMLElement($block->getStringContent(), "");
24
    }
25
}
26