Completed
Pull Request — master (#9)
by Mark
02:18
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   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         dbglog(scandir(DOKU_TMP_DATA.'pages/'),"Pages dir (before test)");
39 39
     }
40 40
 
41
-   function setUp() {
41
+    function setUp() {
42 42
         $this->pluginsEnabled[] = 'backlinks';
43 43
         parent::setUp();
44 44
 
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
         print_r(idx_lookup($query));
78 78
 
79 79
         $this->assertEquals(
80
-                 array('Ross' => array('link' => 1)),
81
-                 idx_lookup($query)
80
+                    array('Ross' => array('link' => 1)),
81
+                    idx_lookup($query)
82 82
         );
83 83
 
84 84
     }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             strpos($response->getContent(), 'A link to Bob Ross') !== false,
101 101
             'A link to Bob Ross was not in the output'
102 102
         );
103
-     }
103
+        }
104 104
 
105 105
     public function testStoryPage() {
106 106
         $request = new TestRequest();
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
         dbglog(pq($wikilink->contents()[0], $doc),"wikilink[0]");
123 123
         $this->assertEquals($wikilink->contents()[3],'A link to Bob Ross',
124
-                           'The last backlink should be a link to Bob Ross');
124
+                            'The last backlink should be a link to Bob Ross');
125 125
     }
126 126
 
127 127
     public function testBacklinks() {
@@ -143,6 +143,6 @@  discard block
 block discarded – undo
143 143
 
144 144
         dbglog(pq($wikilink->contents()[0], $doc),"wikilink[0]");
145 145
         $this->assertEquals($wikilink->contents()[3],'A link to Bob Ross',
146
-                           'The last backlink should be a link to Bob Ross');
146
+                            'The last backlink should be a link to Bob Ross');
147 147
     }
148 148
 }
Please login to merge, or discard this patch.