MichelfPHPMarkdownAdapter::transformText()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace MaglMarkdown\Adapter;
4
5
use Michelf\Markdown;
6
7
/**
8
 * This is an implementation that uses Michel Fortin's PHP Markdown to transform the Markup to HTML
9
 *
10
 * @see    http://michelf.ca/projects/php-markdown/ Michel Fortin's PHP Markdown
11
 * @author Matthias Glaub <[email protected]>
12
 */
13 View Code Duplication
class MichelfPHPMarkdownAdapter extends AbstractMichelfPHPMarkdown implements MarkdownAdapterInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

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.

Loading history...
14
{
15
16
    /**
17
     *
18
     * @var Markdown
19
     */
20
    private $parser;
21
22 1
    public function __construct(array $options = null)
23
    {
24 1
        $this->parser = new Markdown();
25 1
        $this->setParserOptions($this->parser, $options);
26 1
    }
27
28 1
    public function transformText($text)
29
    {
30 1
        return $this->parser->transform($text);
31
    }
32
}
33