@@ -41,9 +41,9 @@ |
||
41 | 41 | |
42 | 42 | $str = [ |
43 | 43 | 'b' => '**', // bold |
44 | - 'c' => '`', // inline code |
|
44 | + 'c' => '`', // inline code |
|
45 | 45 | 'del' => '~~', // strikethrough |
46 | - 'i' => '_', // italic |
|
46 | + 'i' => '_', // italic |
|
47 | 47 | 's' => '~~', // strikethrough |
48 | 48 | 'strong' => '**', // bold |
49 | 49 | ][$this->tag]; |
@@ -127,7 +127,7 @@ |
||
127 | 127 | */ |
128 | 128 | protected function getCssClass(array $additional_classes = []){ |
129 | 129 | $classes = $this->getAttribute('class', '').' '.implode(' ', $additional_classes); |
130 | - $classes =preg_replace('/[^a-z\d\- ]/i', '', $classes); |
|
130 | + $classes = preg_replace('/[^a-z\d\- ]/i', '', $classes); |
|
131 | 131 | $classes = trim($classes); |
132 | 132 | |
133 | 133 | return !empty($classes) ? ' class="'.$classes.'"' : ''; |
@@ -71,9 +71,9 @@ |
||
71 | 71 | |
72 | 72 | public function nestingDataProvider(){ |
73 | 73 | return [ |
74 | - [0, 'bbcode_nesting.txt'], |
|
75 | - [1, 'results/html5_nesting_1.txt'], |
|
76 | - [10, 'results/html5_nesting_10.txt'], |
|
74 | + [0, 'bbcode_nesting.txt'], |
|
75 | + [1, 'results/html5_nesting_1.txt'], |
|
76 | + [10, 'results/html5_nesting_10.txt'], |
|
77 | 77 | [100, 'results/html5_nesting_100.txt'], |
78 | 78 | ]; |
79 | 79 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | |
47 | 47 | public function testEmptyTags(){ |
48 | 48 | $singletags = $this->parser->getSingle(); |
49 | - $exceptions = ['td','th']; |
|
49 | + $exceptions = ['td', 'th']; |
|
50 | 50 | |
51 | 51 | foreach(array_keys($this->parser->getTagmap()) as $tag){ |
52 | 52 | if(!in_array($tag, $singletags) && !in_array($tag, $exceptions)){ |
@@ -38,15 +38,15 @@ discard block |
||
38 | 38 | |
39 | 39 | public function testGetAllowed(){ |
40 | 40 | $options = new ParserOptions; |
41 | - $options->allowed_tags = ['noparse','code','img']; |
|
41 | + $options->allowed_tags = ['noparse', 'code', 'img']; |
|
42 | 42 | |
43 | 43 | $method = $this->reflectionClass->getMethod('getAllowed'); |
44 | 44 | $this->parser = $this->reflectionClass->newInstanceArgs([$options]); |
45 | - $this->assertEquals(['code','img','noparse'], $method->invoke($this->parser)); |
|
45 | + $this->assertEquals(['code', 'img', 'noparse'], $method->invoke($this->parser)); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | public function testGetNoparse(){ |
49 | - $noparse_tags = ['code','css','html','js','json','noparse','nsis','php','pre','sql','xml']; |
|
49 | + $noparse_tags = ['code', 'css', 'html', 'js', 'json', 'noparse', 'nsis', 'php', 'pre', 'sql', 'xml']; |
|
50 | 50 | |
51 | 51 | $method = $this->reflectionClass->getMethod('getNoparse'); |
52 | 52 | $this->parser = $this->reflectionClass->newInstance(); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | public function testGetSingle(){ |
57 | - $singletags = ['br','clear','col','hr']; |
|
57 | + $singletags = ['br', 'clear', 'col', 'hr']; |
|
58 | 58 | |
59 | 59 | $method = $this->reflectionClass->getMethod('getSingle'); |
60 | 60 | $this->parser = $this->reflectionClass->newInstance(); |