Completed
Push — master ( 952f49...c4dcc1 )
by Robbie
01:49
created

MarkdownParser::parse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Glue between Silverstripe TextParser interface and Michelf's markdown parser.
4
 */
5
class MarkdownParser extends TextParser {
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
6
	
7
    /**
8
     * Parse Markdown content
9
     * @return string
10
     */
11
	function parse() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
12
		return Michelf\Markdown::defaultTransform($this->content);
13
	}
14
15
    /**
16
     * Parse MarkdownExtra content
17
     * @return string
18
     */
19
	function parseExtra() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
20
		return Michelf\MarkdownExtra::defaultTransform($this->content);
21
	}
22
23
}
24