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_include.test.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         //print_r(scandir(DOKU_TMP_DATA.'pages/'));
51 51
     }
52 52
 
53
-   function setUp() {
53
+    function setUp() {
54 54
         parent::setUp();
55 55
 
56 56
         global $conf;
@@ -87,6 +87,6 @@  discard block
 block discarded – undo
87 87
         $wikilink = pq('.idx .li .wikilink1', $doc);
88 88
         $this->assertEquals(1, $wikilink->length, 'There should be 1 backlink');
89 89
         $this->assertEquals($wikilink->contents()[0],'An included link to Bob Ross',
90
-                           'There should be a link to "An included link to Bob Ross"');
90
+                            'There should be a link to "An included link to Bob Ross"');
91 91
     }
92 92
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,9 @@
 block discarded – undo
54 54
         parent::tearDownAfterClass();
55 55
 
56 56
         $log = file_get_contents(TMP_DIR . '/cache/debug.log');
57
-        if(!$log) print_r($log);
57
+        if(!$log) {
58
+            print_r($log);
59
+        }
58 60
     }
59 61
 
60 62
     public function setUp() {
Please login to merge, or discard this patch.
_test/syntax_exclude.test.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         //print_r(scandir(DOKU_TMP_DATA.'pages/'));
51 51
     }
52 52
 
53
-   function setUp() {
53
+    function setUp() {
54 54
         parent::setUp();
55 55
 
56 56
         global $conf;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,9 @@
 block discarded – undo
54 54
         parent::tearDownAfterClass();
55 55
 
56 56
         $log = file_get_contents(TMP_DIR . '/cache/debug.log');
57
-        if(!$log) print_r($log);
57
+        if(!$log) {
58
+            print_r($log);
59
+        }
58 60
     }
59 61
 
60 62
     public function setUp() {
Please login to merge, or discard this patch.
_test/syntax.test.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         //print_r(scandir(DOKU_TMP_DATA.'pages/'));
41 41
     }
42 42
 
43
-   function setUp() {
43
+    function setUp() {
44 44
         parent::setUp();
45 45
 
46 46
         global $conf;
@@ -68,17 +68,17 @@  discard block
 block discarded – undo
68 68
         global $conf;
69 69
         $log = file_get_contents($conf['cachedir'].'/debug.log');
70 70
         if(!$log) {
71
-			print_r($log);
72
-			unlink($conf['cachedir'].'/debug.log');
73
-		}
71
+            print_r($log);
72
+            unlink($conf['cachedir'].'/debug.log');
73
+        }
74 74
     }
75 75
 
76 76
     public function testIndex() {
77 77
         $indexer = idx_get_indexer();
78 78
         $query = array('Ross');
79 79
         $this->assertEquals(
80
-                 array('Ross' => array('link' => 1)),
81
-                 $indexer->lookup($query)
80
+                    array('Ross' => array('link' => 1)),
81
+                    $indexer->lookup($query)
82 82
         );
83 83
 
84 84
         print_r($indexer->lookup($query));
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
             strpos($response->getContent(), 'A link to Bob Ross') !== false,
102 102
             'A link to Bob Ross was not in the output'
103 103
         );
104
-     }
104
+        }
105 105
 
106 106
     public function testStoryPage() {
107 107
         $request = new TestRequest();
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         //print "wikilink[0]:\n";
123 123
         //print_r(pq($wikilink->contents()[0], $doc));
124 124
         $this->assertEquals($wikilink->contents()[3],'A link to Bob Ross',
125
-                           'The last backlink should be a link to Bob Ross');
125
+                            'The last backlink should be a link to Bob Ross');
126 126
     }
127 127
 
128 128
     public function testBacklinks() {
@@ -144,6 +144,6 @@  discard block
 block discarded – undo
144 144
         //print "wikilink[0]:\n";
145 145
         //print_r(pq($wikilink->contents()[0], $doc));
146 146
         $this->assertEquals($wikilink->contents()[3],'A link to Bob Ross',
147
-                           'The last backlink should be a link to Bob Ross');
147
+                            'The last backlink should be a link to Bob Ross');
148 148
     }
149 149
 }
Please login to merge, or discard this patch.