Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix coding standards

  • Loading branch information...
commit 02eda0f15fc0ab5ceb196cd41393a7edc8da1fe6 1 parent 2c162b1
Mark S. dereuromark authored
2  Lib/MarkdownifyLib.php
View
@@ -35,4 +35,4 @@ public function parseString($html, $options = array()) {
return $Parser->parseString($html);
}
-}
+}
8 Lib/Parser/MarkdownParser.php
View
@@ -115,18 +115,18 @@ public function parse($text, $options = array()) {
$defaults = array(
'engine' => 'default',
);
- $options = am($defaults, $options);
+ $options = array_merge($defaults, $options);
if (!empty($options['stripHtml'])) {
$text = strip_tags($text);
}
- if ($options['engine'] == 'markdown_extra') {
+ if ($options['engine'] === 'markdown_extra') {
App::import('Vendor', 'MarkupParsers.markdown/markdown');
$Markdown = new MarkdownExtra_Parser;
return trim($Markdown->transform($text));
- } elseif ($options['engine'] == 'markdown') {
+ } elseif ($options['engine'] === 'markdown') {
App::import('Vendor', 'MarkupParsers.markdown/markdown');
$Markdown = new Markdown_Parser;
return trim($Markdown->transform($text));
@@ -549,4 +549,4 @@ protected function _makePlaceHolder($text) {
return $marker;
}
-}
+}
2  Lib/ParserInterface.php
View
@@ -26,4 +26,4 @@
*/
public function parse($text, $options = array());
-}
+}
10 Lib/ParserRegistry.php
View
@@ -54,10 +54,10 @@ protected static function _init() {
'html' => array(
'name' => 'Html',
'className' => 'MarkupParsers.Html'),
- 'textile' => array(
- 'name' => 'Textile',
- 'className' => 'MarkupParsers.Textile'
- )
+ 'textile' => array(
+ 'name' => 'Textile',
+ 'className' => 'MarkupParsers.Textile'
+ )
);
if (empty(self::$_availableParsers)) {
@@ -106,4 +106,4 @@ public static function getParser($parser = '') {
return self::$_parsers[$parser];
}
-}
+}
1  Test/Case/Lib/Parser/BbcodeParserTest.php
View
@@ -94,4 +94,3 @@ public function testParseNotClosedTags() {
}
}
-
2  Test/Case/Lib/Parser/HtmlParserTest.php
View
@@ -90,4 +90,4 @@ public function testParseCode() {
$this->assertTextEquals($expected, $result);
}
-}
+}
1  Test/Case/Lib/Parser/MarkdownParserTest.php
View
@@ -842,4 +842,3 @@ public function testParseWithOtherEngines() {
}
-
4 Test/Case/View/Helper/ParserHelperTest.php
View
@@ -70,7 +70,7 @@ public function testParse() {
$result = $this->Parser->parse($string, 'markdown');
$this->assertEquals(array('<h1>Foobar</h1>'), $result);
- $string = 'h1. Foobar';
+ $string = 'h1. Foobar';
$result = $this->Parser->parse($string, 'textile');
$this->assertEquals(array('<h1>Foobar</h1>'), $result);
@@ -84,4 +84,4 @@ public function testParse() {
$this->assertEquals(array('<b>Foobar</b>', '<b>Barfoo</b>'), $result);
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.