Completed
Pull Request — master (#9)
by Mark
02:15
created
syntax.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,10 +13,16 @@  discard block
 block discarded – undo
13 13
  * @author  Michael Klier <[email protected]>
14 14
  * @author  Mark C. Prins <[email protected]>
15 15
  */
16
-if(!defined('DOKU_INC')) die();
16
+if(!defined('DOKU_INC')) {
17
+    die();
18
+}
17 19
 
18
-if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
19
-if(!defined('DW_LF')) define('DW_LF',"\n");
20
+if(!defined('DOKU_PLUGIN')) {
21
+    define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
22
+}
23
+if(!defined('DW_LF')) {
24
+    define('DW_LF',"\n");
25
+}
20 26
 
21 27
 require_once(DOKU_PLUGIN.'syntax.php');
22 28
 require_once(DOKU_INC.'inc/parserutils.php');
@@ -119,7 +125,9 @@  discard block
 block discarded – undo
119 125
 
120 126
                 foreach($backlinks as $backlink){
121 127
                     $name = p_get_metadata($backlink,'title');
122
-                    if(empty($name)) $name = $backlink;
128
+                    if(empty($name)) {
129
+                        $name = $backlink;
130
+                    }
123 131
                     $renderer->doc .= '<li><div class="li">';
124 132
                     $renderer->doc .= html_wikilink(':'.$backlink,$name,'');
125 133
                     $renderer->doc .= '</div></li>';
Please login to merge, or discard this patch.
_test/syntax.test.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         //print "wikilink[0]:\n";
81 81
         //print_r(pq($wikilink->contents()[0], $doc));
82 82
         $this->assertEquals($wikilink->contents()[3],'A link to Bob Ross',
83
-                           'The last backlink should be a link to Bob Ross');
83
+                            'The last backlink should be a link to Bob Ross');
84 84
     }
85 85
 
86 86
     public function testLinksPage() {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             strpos($response->getContent(), 'A link to Bob Ross') !== false,
94 94
             'A link to Bob Ross was not in the output'
95 95
         );
96
-     }
96
+        }
97 97
 
98 98
     public function testBacklinks() {
99 99
         $request = new TestRequest();
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         //print "wikilink[0]:\n";
117 117
         //print_r(pq($wikilink->contents()[0], $doc));
118 118
         $this->assertEquals($wikilink->contents()[3],'A link to Bob Ross',
119
-                           'The last backlink should be a link to Bob Ross');
119
+                            'The last backlink should be a link to Bob Ross');
120 120
     }
121 121
 
122 122
     public function testInclude() {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $wikilink = pq('.idx .li .wikilink1', $doc);
138 138
         $this->assertEquals(1, $wikilink->length, 'There should be 1 backlink');
139 139
         $this->assertEquals($wikilink->contents()[0],'An included link to Bob Ross',
140
-                           'There should be a link to "An included link to Bob Ross"');
140
+                            'There should be a link to "An included link to Bob Ross"');
141 141
     }
142 142
 
143 143
     public function testExclude() {
Please login to merge, or discard this patch.