GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — develop ( e54387...b62a26 )
by Lonnie
10s
created
application/config/smileys.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -17,48 +17,48 @@
 block discarded – undo
17 17
 
18 18
 //	smiley			image name						width	height	alt
19 19
 
20
-	':-)'			=>	array('grin.gif',			'19',	'19',	'grin'),
21
-	':lol:'			=>	array('lol.gif',			'19',	'19',	'LOL'),
22
-	':cheese:'		=>	array('cheese.gif',			'19',	'19',	'cheese'),
23
-	':)'			=>	array('smile.gif',			'19',	'19',	'smile'),
24
-	';-)'			=>	array('wink.gif',			'19',	'19',	'wink'),
25
-	';)'			=>	array('wink.gif',			'19',	'19',	'wink'),
26
-	':smirk:'		=>	array('smirk.gif',			'19',	'19',	'smirk'),
27
-	':roll:'		=>	array('rolleyes.gif',		'19',	'19',	'rolleyes'),
28
-	':-S'			=>	array('confused.gif',		'19',	'19',	'confused'),
29
-	':wow:'			=>	array('surprise.gif',		'19',	'19',	'surprised'),
30
-	':bug:'			=>	array('bigsurprise.gif',	'19',	'19',	'big surprise'),
31
-	':-P'			=>	array('tongue_laugh.gif',	'19',	'19',	'tongue laugh'),
32
-	'%-P'			=>	array('tongue_rolleye.gif',	'19',	'19',	'tongue rolleye'),
33
-	';-P'			=>	array('tongue_wink.gif',	'19',	'19',	'tongue wink'),
34
-	':P'			=>	array('raspberry.gif',		'19',	'19',	'raspberry'),
35
-	':blank:'		=>	array('blank.gif',			'19',	'19',	'blank stare'),
36
-	':long:'		=>	array('longface.gif',		'19',	'19',	'long face'),
37
-	':ohh:'			=>	array('ohh.gif',			'19',	'19',	'ohh'),
38
-	':grrr:'		=>	array('grrr.gif',			'19',	'19',	'grrr'),
39
-	':gulp:'		=>	array('gulp.gif',			'19',	'19',	'gulp'),
40
-	'8-/'			=>	array('ohoh.gif',			'19',	'19',	'oh oh'),
41
-	':down:'		=>	array('downer.gif',			'19',	'19',	'downer'),
42
-	':red:'			=>	array('embarrassed.gif',	'19',	'19',	'red face'),
43
-	':sick:'		=>	array('sick.gif',			'19',	'19',	'sick'),
44
-	':shut:'		=>	array('shuteye.gif',		'19',	'19',	'shut eye'),
45
-	':-/'			=>	array('hmm.gif',			'19',	'19',	'hmmm'),
46
-	'>:('			=>	array('mad.gif',			'19',	'19',	'mad'),
47
-	':mad:'			=>	array('mad.gif',			'19',	'19',	'mad'),
48
-	'>:-('			=>	array('angry.gif',			'19',	'19',	'angry'),
49
-	':angry:'		=>	array('angry.gif',			'19',	'19',	'angry'),
50
-	':zip:'			=>	array('zip.gif',			'19',	'19',	'zipper'),
51
-	':kiss:'		=>	array('kiss.gif',			'19',	'19',	'kiss'),
52
-	':ahhh:'		=>	array('shock.gif',			'19',	'19',	'shock'),
53
-	':coolsmile:'	=>	array('shade_smile.gif',	'19',	'19',	'cool smile'),
54
-	':coolsmirk:'	=>	array('shade_smirk.gif',	'19',	'19',	'cool smirk'),
55
-	':coolgrin:'	=>	array('shade_grin.gif',		'19',	'19',	'cool grin'),
56
-	':coolhmm:'		=>	array('shade_hmm.gif',		'19',	'19',	'cool hmm'),
57
-	':coolmad:'		=>	array('shade_mad.gif',		'19',	'19',	'cool mad'),
58
-	':coolcheese:'	=>	array('shade_cheese.gif',	'19',	'19',	'cool cheese'),
59
-	':vampire:'		=>	array('vampire.gif',		'19',	'19',	'vampire'),
60
-	':snake:'		=>	array('snake.gif',			'19',	'19',	'snake'),
61
-	':exclaim:'		=>	array('exclaim.gif',		'19',	'19',	'exclaim'),
62
-	':question:'	=>	array('question.gif',		'19',	'19',	'question')
20
+	':-)'			=>	array('grin.gif', '19', '19', 'grin'),
21
+	':lol:'			=>	array('lol.gif', '19', '19', 'LOL'),
22
+	':cheese:'		=>	array('cheese.gif', '19', '19', 'cheese'),
23
+	':)'			=>	array('smile.gif', '19', '19', 'smile'),
24
+	';-)'			=>	array('wink.gif', '19', '19', 'wink'),
25
+	';)'			=>	array('wink.gif', '19', '19', 'wink'),
26
+	':smirk:'		=>	array('smirk.gif', '19', '19', 'smirk'),
27
+	':roll:'		=>	array('rolleyes.gif', '19', '19', 'rolleyes'),
28
+	':-S'			=>	array('confused.gif', '19', '19', 'confused'),
29
+	':wow:'			=>	array('surprise.gif', '19', '19', 'surprised'),
30
+	':bug:'			=>	array('bigsurprise.gif', '19', '19', 'big surprise'),
31
+	':-P'			=>	array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
32
+	'%-P'			=>	array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
33
+	';-P'			=>	array('tongue_wink.gif', '19', '19', 'tongue wink'),
34
+	':P'			=>	array('raspberry.gif', '19', '19', 'raspberry'),
35
+	':blank:'		=>	array('blank.gif', '19', '19', 'blank stare'),
36
+	':long:'		=>	array('longface.gif', '19', '19', 'long face'),
37
+	':ohh:'			=>	array('ohh.gif', '19', '19', 'ohh'),
38
+	':grrr:'		=>	array('grrr.gif', '19', '19', 'grrr'),
39
+	':gulp:'		=>	array('gulp.gif', '19', '19', 'gulp'),
40
+	'8-/'			=>	array('ohoh.gif', '19', '19', 'oh oh'),
41
+	':down:'		=>	array('downer.gif', '19', '19', 'downer'),
42
+	':red:'			=>	array('embarrassed.gif', '19', '19', 'red face'),
43
+	':sick:'		=>	array('sick.gif', '19', '19', 'sick'),
44
+	':shut:'		=>	array('shuteye.gif', '19', '19', 'shut eye'),
45
+	':-/'			=>	array('hmm.gif', '19', '19', 'hmmm'),
46
+	'>:('			=>	array('mad.gif', '19', '19', 'mad'),
47
+	':mad:'			=>	array('mad.gif', '19', '19', 'mad'),
48
+	'>:-('			=>	array('angry.gif', '19', '19', 'angry'),
49
+	':angry:'		=>	array('angry.gif', '19', '19', 'angry'),
50
+	':zip:'			=>	array('zip.gif', '19', '19', 'zipper'),
51
+	':kiss:'		=>	array('kiss.gif', '19', '19', 'kiss'),
52
+	':ahhh:'		=>	array('shock.gif', '19', '19', 'shock'),
53
+	':coolsmile:'	=>	array('shade_smile.gif', '19', '19', 'cool smile'),
54
+	':coolsmirk:'	=>	array('shade_smirk.gif', '19', '19', 'cool smirk'),
55
+	':coolgrin:'	=>	array('shade_grin.gif', '19', '19', 'cool grin'),
56
+	':coolhmm:'		=>	array('shade_hmm.gif', '19', '19', 'cool hmm'),
57
+	':coolmad:'		=>	array('shade_mad.gif', '19', '19', 'cool mad'),
58
+	':coolcheese:'	=>	array('shade_cheese.gif', '19', '19', 'cool cheese'),
59
+	':vampire:'		=>	array('vampire.gif', '19', '19', 'vampire'),
60
+	':snake:'		=>	array('snake.gif', '19', '19', 'snake'),
61
+	':exclaim:'		=>	array('exclaim.gif', '19', '19', 'exclaim'),
62
+	':question:'	=>	array('question.gif', '19', '19', 'question')
63 63
 
64 64
 );
Please login to merge, or discard this patch.
application/core/MY_Loader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once APPPATH .'third_party/HMVC/Loader.php';
3
+require_once APPPATH.'third_party/HMVC/Loader.php';
4 4
 
5 5
 class MY_Loader extends HMVC_Loader {
6 6
 
Please login to merge, or discard this patch.
application/core/MY_Router.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require_once APPPATH .'third_party/HMVC/Router.php';
3
+require_once APPPATH.'third_party/HMVC/Router.php';
4 4
 
5 5
 class MY_Router extends HMVC_Router {}
Please login to merge, or discard this patch.
application/database/migrations/20141007214216_Create_auth_tables.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 class Migration_create_auth_tables extends CI_Migration {
12 12
 
13
-    public function up ()
13
+    public function up()
14 14
     {
15 15
         // Auth Login Attempts
16 16
         $fields = [
@@ -76,14 +76,14 @@  discard block
 block discarded – undo
76 76
             ]
77 77
         ];
78 78
         $this->dbforge->add_field($fields);
79
-        $this->dbforge->add_key( ['email', 'hash'] );
79
+        $this->dbforge->add_key(['email', 'hash']);
80 80
 
81 81
         $this->dbforge->create_table('auth_tokens', true, config_item('migration_create_table_attr'));
82 82
     }
83 83
 
84 84
     //--------------------------------------------------------------------
85 85
 
86
-    public function down ()
86
+    public function down()
87 87
     {
88 88
         $this->dbforge->drop_table('auth_tokens');
89 89
         $this->dbforge->drop_table('auth_logins');
Please login to merge, or discard this patch.
application/database/migrations/20150123155112_CreateSessionTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  */
11 11
 class Migration_Createsessiontable extends CI_Migration {
12 12
 
13
-    public function up ()
13
+    public function up()
14 14
     {
15 15
         $fields = array(
16 16
             'id' => array(
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     //--------------------------------------------------------------------
49 49
 
50
-    public function down ()
50
+    public function down()
51 51
     {
52 52
         $this->dbforge->drop_table('ci_sessions');
53 53
     }
Please login to merge, or discard this patch.
application/helpers/markdown_extended_helper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('Markdown')) {
3
+if ( ! function_exists('Markdown')) {
4 4
     require_once('markdown_helper.php');
5 5
 }
6 6
 define('MARKDOWNEXTRAEXTENDED_VERSION', "0.3");
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     function _doBlockQuotes_callback($matches)
68 68
     {
69 69
         $cite = $matches[1];
70
-        $bq   = '> ' . $matches[2];
70
+        $bq   = '> '.$matches[2];
71 71
         # trim one level of quoting - trim whitespace-only lines
72 72
         $bq = preg_replace('/^[ ]*>[ ]?|^[ ]+$/m', '', $bq);
73 73
         $bq = $this->runBlockGamut($bq); # recurse
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $res = "<blockquote";
85 85
         $res .= empty($cite) ? ">" : " cite=\"$cite\">";
86 86
         $res .= "\n$bq\n</blockquote>";
87
-        return "\n" . $this->hashBlock($res) . "\n\n";
87
+        return "\n".$this->hashBlock($res)."\n\n";
88 88
     }
89 89
 
90 90
     function doFencedCodeBlocks($text)
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $cb = empty($matches[3]) ? "<pre><code" : "<pre class=\"linenums:$matches[3]\"><code";
134 134
         $cb .= empty($matches[2]) ? ">" : " class=\"language-$matches[2]\">";
135 135
         $cb .= "$codeblock</code></pre>";
136
-        return "\n\n" . $this->hashBlock($cb) . "\n\n";
136
+        return "\n\n".$this->hashBlock($cb)."\n\n";
137 137
     }
138 138
 
139 139
     function doFencedFigures($text)
@@ -184,15 +184,15 @@  discard block
 block discarded – undo
184 184
         );
185 185
 
186 186
         $res = "<figure>";
187
-        if (!empty($topcaption)) {
187
+        if ( ! empty($topcaption)) {
188 188
             $res .= "\n<figcaption>$topcaption</figcaption>";
189 189
         }
190 190
         $res .= "\n$figure\n";
191
-        if (!empty($bottomcaption) && empty($topcaption)) {
191
+        if ( ! empty($bottomcaption) && empty($topcaption)) {
192 192
             $res .= "<figcaption>$bottomcaption</figcaption>";
193 193
         }
194 194
         $res .= "</figure>";
195
-        return "\n" . $this->hashBlock($res) . "\n\n";
195
+        return "\n".$this->hashBlock($res)."\n\n";
196 196
     }
197 197
 }
198 198
 
Please login to merge, or discard this patch.
application/helpers/markdown_helper.php 1 patch
Spacing   +198 added lines, -198 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 #
59 59
     # Setup static parser variable.
60 60
     static $parser;
61
-    if (!isset($parser)) {
61
+    if ( ! isset($parser)) {
62 62
         $parser_class = MARKDOWN_PARSER_CLASS;
63 63
         $parser       = new $parser_class;
64 64
     }
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
     function mdwp_MarkdownPost($text)
109 109
     {
110 110
         static $parser;
111
-        if (!$parser) {
111
+        if ( ! $parser) {
112 112
             $parser_class = MARKDOWN_PARSER_CLASS;
113 113
             $parser       = new $parser_class;
114 114
         }
115 115
         if (is_single() || is_page() || is_feed()) {
116 116
             $parser->fn_id_prefix = "";
117 117
         } else {
118
-            $parser->fn_id_prefix = get_the_ID() . ".";
118
+            $parser->fn_id_prefix = get_the_ID().".";
119 119
         }
120 120
         return $parser->transform($text);
121 121
     }
@@ -136,14 +136,14 @@  discard block
 block discarded – undo
136 136
         add_filter('get_comment_excerpt', 'mdwp_strip_p', 7);
137 137
 
138 138
         global $mdwp_hidden_tags, $mdwp_placeholders;
139
-        $mdwp_hidden_tags  = explode(
139
+        $mdwp_hidden_tags = explode(
140 140
             ' ',
141 141
             '<p> </p> <pre> </pre> <ol> </ol> <ul> </ul> <li> </li>'
142 142
         );
143 143
         $mdwp_placeholders = explode(
144 144
             ' ',
145 145
             str_rot13(
146
-                'pEj07ZbbBZ U1kqgh4w4p pre2zmeN6K QTi31t9pre ol0MP1jzJR ' .
146
+                'pEj07ZbbBZ U1kqgh4w4p pre2zmeN6K QTi31t9pre ol0MP1jzJR '.
147 147
                 'ML5IjmbRol ulANi1NsGY J7zRLJqPul liA8ctl16T K9nhooUHli'
148 148
             )
149 149
         );
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
 
152 152
     function mdwp_add_p($text)
153 153
     {
154
-        if (!preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) {
155
-            $text = '<p>' . $text . '</p>';
154
+        if ( ! preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) {
155
+            $text = '<p>'.$text.'</p>';
156 156
             $text = preg_replace('{\n{2,}}', "</p>\n\n<p>", $text);
157 157
         }
158 158
         return $text;
@@ -279,14 +279,14 @@  discard block
 block discarded – undo
279 279
         $this->prepareItalicsAndBold();
280 280
 
281 281
         $this->nested_brackets_re =
282
-            str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth) .
282
+            str_repeat('(?>[^\[\]]+|\[', $this->nested_brackets_depth).
283 283
             str_repeat('\])*', $this->nested_brackets_depth);
284 284
 
285 285
         $this->nested_url_parenthesis_re =
286
-            str_repeat('(?>[^()\s]+|\(', $this->nested_url_parenthesis_depth) .
286
+            str_repeat('(?>[^()\s]+|\(', $this->nested_url_parenthesis_depth).
287 287
             str_repeat('(?>\)))*', $this->nested_url_parenthesis_depth);
288 288
 
289
-        $this->escape_chars_re = '[' . preg_quote($this->escape_chars) . ']';
289
+        $this->escape_chars_re = '['.preg_quote($this->escape_chars).']';
290 290
 
291 291
         # Sort document, block, and span gamut in ascendent priority order.
292 292
         asort($this->document_gamut);
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 
367 367
         $this->teardown();
368 368
 
369
-        return $text . "\n";
369
+        return $text."\n";
370 370
     }
371 371
 
372 372
     var $document_gamut = array(
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
         # Link defs are in the form: ^[id]: url "optional title"
387 387
         $text = preg_replace_callback(
388 388
             '{
389
-							^[ ]{0,' . $less_than_tab . '}\[(.+)\][ ]?:	# id = $1
389
+							^[ ]{0,' . $less_than_tab.'}\[(.+)\][ ]?:	# id = $1
390 390
 							  [ ]*
391 391
 							  \n?				# maybe *one* newline
392 392
 							  [ ]*
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         $link_id                = strtolower($matches[1]);
419 419
         $url                    = $matches[2] == '' ? $matches[3] : $matches[2];
420 420
         $this->urls[$link_id]   = $url;
421
-        $this->titles[$link_id] =& $matches[4];
421
+        $this->titles[$link_id] = & $matches[4];
422 422
         return ''; # String that will replace the block
423 423
     }
424 424
 
@@ -444,9 +444,9 @@  discard block
 block discarded – undo
444 444
         # *  List "b" is made of tags which are always block-level;
445 445
         #
446 446
         $block_tags_a_re = 'ins|del';
447
-        $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|' .
448
-                           'script|noscript|form|fieldset|iframe|math|svg|' .
449
-                           'article|section|nav|aside|hgroup|header|footer|' .
447
+        $block_tags_b_re = 'p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|'.
448
+                           'script|noscript|form|fieldset|iframe|math|svg|'.
449
+                           'article|section|nav|aside|hgroup|header|footer|'.
450 450
                            'figure';
451 451
 
452 452
         # Regular expression for the content of a block tag.
@@ -465,21 +465,21 @@  discard block
 block discarded – undo
465 465
 			  )*
466 466
 			)?
467 467
 			';
468
-        $content           =
468
+        $content =
469 469
             str_repeat(
470 470
                 '
471 471
 				(?>
472 472
 				  [^<]+			# content without tag
473 473
 				|
474 474
 				  <\2			# nested opening tag
475
-					' . $attr . '	# attributes
475
+					' . $attr.'	# attributes
476 476
 					(?>
477 477
 					  />
478 478
 					|
479 479
 					  >',
480 480
                 $nested_tags_level
481
-            ) . # end of opening tag
482
-            '.*?' . # last level nested tag content
481
+            ).# end of opening tag
482
+            '.*?'.# last level nested tag content
483 483
             str_repeat(
484 484
                 '
485 485
 					  </\2\s*>	# closing nested tag
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
 				)*',
491 491
                 $nested_tags_level
492 492
             );
493
-        $content2          = str_replace('\2', '\3', $content);
493
+        $content2 = str_replace('\2', '\3', $content);
494 494
 
495 495
         # First, look for nested blocks, e.g.:
496 496
         # 	<div>
@@ -515,20 +515,20 @@  discard block
 block discarded – undo
515 515
 			  # Match from `\n<tag>` to `</tag>\n`, handling nested tags
516 516
 			  # in between.
517 517
 
518
-						[ ]{0,' . $less_than_tab . '}
519
-						<(' . $block_tags_b_re . ')# start tag = $2
520
-						' . $attr . '>			# attributes followed by > and \n
521
-						' . $content . '		# content, support nesting
518
+						[ ]{0,' . $less_than_tab.'}
519
+						<(' . $block_tags_b_re.')# start tag = $2
520
+						' . $attr.'>			# attributes followed by > and \n
521
+						' . $content.'		# content, support nesting
522 522
 						</\2>				# the matching end tag
523 523
 						[ ]*				# trailing spaces/tabs
524 524
 						(?=\n+|\Z)	# followed by a newline or end of document
525 525
 
526 526
 			| # Special version for tags of group a.
527 527
 
528
-						[ ]{0,' . $less_than_tab . '}
529
-						<(' . $block_tags_a_re . ')# start tag = $3
530
-						' . $attr . '>[ ]*\n	# attributes followed by >
531
-						' . $content2 . '		# content, support nesting
528
+						[ ]{0,' . $less_than_tab.'}
529
+						<(' . $block_tags_a_re.')# start tag = $3
530
+						' . $attr.'>[ ]*\n	# attributes followed by >
531
+						' . $content2.'		# content, support nesting
532 532
 						</\3>				# the matching end tag
533 533
 						[ ]*				# trailing spaces/tabs
534 534
 						(?=\n+|\Z)	# followed by a newline or end of document
@@ -536,16 +536,16 @@  discard block
 block discarded – undo
536 536
 			| # Special case just for <hr />. It was easier to make a special
537 537
 			  # case than to make the other regex more complicated.
538 538
 
539
-						[ ]{0,' . $less_than_tab . '}
539
+						[ ]{0,' . $less_than_tab.'}
540 540
 						<(hr)				# start tag = $2
541
-						' . $attr . '			# attributes
541
+						' . $attr.'			# attributes
542 542
 						/?>					# the matching end tag
543 543
 						[ ]*
544 544
 						(?=\n{2,}|\Z)		# followed by a blank line or end of document
545 545
 
546 546
 			| # Special case for standalone HTML comments:
547 547
 
548
-					[ ]{0,' . $less_than_tab . '}
548
+					[ ]{0,' . $less_than_tab.'}
549 549
 					(?s:
550 550
 						<!-- .*? -->
551 551
 					)
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
 
555 555
 			| # PHP and ASP-style processor instructions (<? and <%)
556 556
 
557
-					[ ]{0,' . $less_than_tab . '}
557
+					[ ]{0,' . $less_than_tab.'}
558 558
 					(?s:
559 559
 						<([?%])			# $2
560 560
 						.*?
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 
598 598
         # Then hash the block.
599 599
         static $i = 0;
600
-        $key                     = "$boundary\x1A" . ++ $i . $boundary;
600
+        $key                     = "$boundary\x1A".++ $i.$boundary;
601 601
         $this->html_hashes[$key] = $text;
602 602
         return $key; # String that will replace the tag.
603 603
     }
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 				[ ]*		# Tailing spaces
669 669
 				$			# End of line.
670 670
 			}mx',
671
-            "\n" . $this->hashBlock("<hr$this->empty_element_suffix") . "\n",
671
+            "\n".$this->hashBlock("<hr$this->empty_element_suffix")."\n",
672 672
             $text
673 673
         );
674 674
     }
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
         #
681 681
         # Process character escapes, code spans, and inline HTML
682 682
         # in one shot.
683
-        "parseSpan"           => - 30,
683
+        "parseSpan"           => -30,
684 684
         # Process anchor and image tags. Images must come first,
685 685
         # because ![foo][f] looks like an anchor.
686 686
         "doImages"            => 10,
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
             '{
739 739
 			(					# wrap whole match in $1
740 740
 			  \[
741
-				(' . $this->nested_brackets_re . ')	# link text = $2
741
+				(' . $this->nested_brackets_re.')	# link text = $2
742 742
 			  \]
743 743
 
744 744
 			  [ ]?				# one optional space
@@ -760,14 +760,14 @@  discard block
 block discarded – undo
760 760
             '{
761 761
 			(				# wrap whole match in $1
762 762
 			  \[
763
-				(' . $this->nested_brackets_re . ')	# link text = $2
763
+				(' . $this->nested_brackets_re.')	# link text = $2
764 764
 			  \]
765 765
 			  \(			# literal paren
766 766
 				[ \n]*
767 767
 				(?:
768 768
 					<(.+?)>	# href = $3
769 769
 				|
770
-					(' . $this->nested_url_parenthesis_re . ')	# href = $4
770
+					(' . $this->nested_url_parenthesis_re.')	# href = $4
771 771
 				)
772 772
 				[ \n]*
773 773
 				(			# $5
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
     {
809 809
         $whole_match = $matches[1];
810 810
         $link_text   = $matches[2];
811
-        $link_id     =& $matches[3];
811
+        $link_id     = & $matches[3];
812 812
 
813 813
         if ($link_id == "") {
814 814
             # for shortcut links like [this][] or [this].
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
         $whole_match = $matches[1];
845 845
         $link_text   = $this->runSpanGamut($matches[2]);
846 846
         $url         = $matches[3] == '' ? $matches[4] : $matches[3];
847
-        $title       =& $matches[7];
847
+        $title       = & $matches[7];
848 848
 
849 849
         $url = $this->encodeAttribute($url);
850 850
 
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
             '{
873 873
 			(				# wrap whole match in $1
874 874
 			  !\[
875
-				(' . $this->nested_brackets_re . ')		# alt text = $2
875
+				(' . $this->nested_brackets_re.')		# alt text = $2
876 876
 			  \]
877 877
 
878 878
 			  [ ]?				# one optional space
@@ -896,7 +896,7 @@  discard block
 block discarded – undo
896 896
             '{
897 897
 			(				# wrap whole match in $1
898 898
 			  !\[
899
-				(' . $this->nested_brackets_re . ')		# alt text = $2
899
+				(' . $this->nested_brackets_re.')		# alt text = $2
900 900
 			  \]
901 901
 			  \s?			# One optional whitespace character
902 902
 			  \(			# literal paren
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
 				(?:
905 905
 					<(\S*)>	# src url = $3
906 906
 				|
907
-					(' . $this->nested_url_parenthesis_re . ')	# src url = $4
907
+					(' . $this->nested_url_parenthesis_re.')	# src url = $4
908 908
 				)
909 909
 				[ \n]*
910 910
 				(			# $5
@@ -957,7 +957,7 @@  discard block
 block discarded – undo
957 957
         $whole_match = $matches[1];
958 958
         $alt_text    = $matches[2];
959 959
         $url         = $matches[3] == '' ? $matches[4] : $matches[3];
960
-        $title       =& $matches[7];
960
+        $title       = & $matches[7];
961 961
 
962 962
         $alt_text = $this->encodeAttribute($alt_text);
963 963
         $url      = $this->encodeAttribute($url);
@@ -1017,15 +1017,15 @@  discard block
 block discarded – undo
1017 1017
         }
1018 1018
 
1019 1019
         $level = $matches[2]{0} == '=' ? 1 : 2;
1020
-        $block = "<h$level>" . $this->runSpanGamut($matches[1]) . "</h$level>";
1021
-        return "\n" . $this->hashBlock($block) . "\n\n";
1020
+        $block = "<h$level>".$this->runSpanGamut($matches[1])."</h$level>";
1021
+        return "\n".$this->hashBlock($block)."\n\n";
1022 1022
     }
1023 1023
 
1024 1024
     function _doHeaders_callback_atx($matches)
1025 1025
     {
1026 1026
         $level = strlen($matches[1]);
1027
-        $block = "<h$level>" . $this->runSpanGamut($matches[2]) . "</h$level>";
1028
-        return "\n" . $this->hashBlock($block) . "\n\n";
1027
+        $block = "<h$level>".$this->runSpanGamut($matches[2])."</h$level>";
1028
+        return "\n".$this->hashBlock($block)."\n\n";
1029 1029
     }
1030 1030
 
1031 1031
     function doLists($text)
@@ -1050,8 +1050,8 @@  discard block
 block discarded – undo
1050 1050
             $whole_list_re = '
1051 1051
 				(								# $1 = whole list
1052 1052
 				  (								# $2
1053
-					([ ]{0,' . $less_than_tab . '})	# $3 = number of spaces
1054
-					(' . $marker_re . ')			# $4 = first list item marker
1053
+					([ ]{0,' . $less_than_tab.'})	# $3 = number of spaces
1054
+					(' . $marker_re.')			# $4 = first list item marker
1055 1055
 					[ ]+
1056 1056
 				  )
1057 1057
 				  (?s:.+?)
@@ -1062,13 +1062,13 @@  discard block
 block discarded – undo
1062 1062
 					  (?=\S)
1063 1063
 					  (?!						# Negative lookahead for another list item marker
1064 1064
 						[ ]*
1065
-						' . $marker_re . '[ ]+
1065
+						' . $marker_re.'[ ]+
1066 1066
 					  )
1067 1067
 					|
1068 1068
 					  (?=						# Lookahead for another kind of list
1069 1069
 					    \n
1070 1070
 						\3						# Must have the same indentation
1071
-						' . $other_marker_re . '[ ]+
1071
+						' . $other_marker_re.'[ ]+
1072 1072
 					  )
1073 1073
 				  )
1074 1074
 				)
@@ -1081,7 +1081,7 @@  discard block
 block discarded – undo
1081 1081
                 $text = preg_replace_callback(
1082 1082
                     '{
1083 1083
 						^
1084
-						' . $whole_list_re . '
1084
+						' . $whole_list_re.'
1085 1085
 					}mx',
1086 1086
                     array(&$this, '_doLists_callback'),
1087 1087
                     $text
@@ -1090,7 +1090,7 @@  discard block
 block discarded – undo
1090 1090
                 $text = preg_replace_callback(
1091 1091
                     '{
1092 1092
 						(?:(?<=\n)\n|\A\n?) # Must eat the newline
1093
-						' . $whole_list_re . '
1093
+						' . $whole_list_re.'
1094 1094
 					}mx',
1095 1095
                     array(&$this, '_doLists_callback'),
1096 1096
                     $text
@@ -1116,8 +1116,8 @@  discard block
 block discarded – undo
1116 1116
         $list .= "\n";
1117 1117
         $result = $this->processListItems($list, $marker_any_re);
1118 1118
 
1119
-        $result = $this->hashBlock("<$list_type>\n" . $result . "</$list_type>");
1120
-        return "\n" . $result . "\n\n";
1119
+        $result = $this->hashBlock("<$list_type>\n".$result."</$list_type>");
1120
+        return "\n".$result."\n\n";
1121 1121
     }
1122 1122
 
1123 1123
     var $list_level = 0;
@@ -1149,7 +1149,7 @@  discard block
 block discarded – undo
1149 1149
         # change the syntax rules such that sub-lists must start with a
1150 1150
         # starting cardinal number; e.g. "1." or "a.".
1151 1151
 
1152
-        $this->list_level ++;
1152
+        $this->list_level++;
1153 1153
 
1154 1154
         # trim trailing blank lines:
1155 1155
         $list_str = preg_replace("/\n{2,}\\z/", "\n", $list_str);
@@ -1158,35 +1158,35 @@  discard block
 block discarded – undo
1158 1158
             '{
1159 1159
 			(\n)?							# leading line = $1
1160 1160
 			(^[ ]*)							# leading whitespace = $2
1161
-			(' . $marker_any_re . '				# list marker and space = $3
1161
+			(' . $marker_any_re.'				# list marker and space = $3
1162 1162
 				(?:[ ]+|(?=\n))	# space only required if item is not empty
1163 1163
 			)
1164 1164
 			((?s:.*?))						# list item text   = $4
1165 1165
 			(?:(\n+(?=\n))|\n)				# tailing blank line = $5
1166
-			(?= \n* (\z | \2 (' . $marker_any_re . ') (?:[ ]+|(?=\n))))
1166
+			(?= \n* (\z | \2 (' . $marker_any_re.') (?:[ ]+|(?=\n))))
1167 1167
 			}xm',
1168 1168
             array(&$this, '_processListItems_callback'),
1169 1169
             $list_str
1170 1170
         );
1171 1171
 
1172
-        $this->list_level --;
1172
+        $this->list_level--;
1173 1173
         return $list_str;
1174 1174
     }
1175 1175
 
1176 1176
     function _processListItems_callback($matches)
1177 1177
     {
1178 1178
         $item               = $matches[4];
1179
-        $leading_line       =& $matches[1];
1180
-        $leading_space      =& $matches[2];
1179
+        $leading_line       = & $matches[1];
1180
+        $leading_space      = & $matches[2];
1181 1181
         $marker_space       = $matches[3];
1182
-        $tailing_blank_line =& $matches[5];
1182
+        $tailing_blank_line = & $matches[5];
1183 1183
 
1184 1184
         if ($leading_line || $tailing_blank_line ||
1185 1185
             preg_match('/\n{2,}/', $item)
1186 1186
         ) {
1187 1187
             # Replace marker with the appropriate whitespace indentation
1188
-            $item = $leading_space . str_repeat(' ', strlen($marker_space)) . $item;
1189
-            $item = $this->runBlockGamut($this->outdent($item) . "\n");
1188
+            $item = $leading_space.str_repeat(' ', strlen($marker_space)).$item;
1189
+            $item = $this->runBlockGamut($this->outdent($item)."\n");
1190 1190
         } else {
1191 1191
             # Recursion for sub-lists:
1192 1192
             $item = $this->doLists($this->outdent($item));
@@ -1194,7 +1194,7 @@  discard block
 block discarded – undo
1194 1194
             $item = $this->runSpanGamut($item);
1195 1195
         }
1196 1196
 
1197
-        return "<li>" . $item . "</li>\n";
1197
+        return "<li>".$item."</li>\n";
1198 1198
     }
1199 1199
 
1200 1200
     function doCodeBlocks($text)
@@ -1207,11 +1207,11 @@  discard block
 block discarded – undo
1207 1207
 				(?:\n\n|\A\n?)
1208 1208
 				(	            # $1 = the code block -- one or more lines, starting with a space/tab
1209 1209
 				  (?>
1210
-					[ ]{' . $this->tab_width . '}  # Lines must start with a tab or a tab-width of spaces
1210
+					[ ]{' . $this->tab_width.'}  # Lines must start with a tab or a tab-width of spaces
1211 1211
 					.*\n+
1212 1212
 				  )+
1213 1213
 				)
1214
-				((?=^[ ]{0,' . $this->tab_width . '}\S)|\Z)	# Lookahead for non-space at line-start, or end of doc
1214
+				((?=^[ ]{0,' . $this->tab_width.'}\S)|\Z)	# Lookahead for non-space at line-start, or end of doc
1215 1215
 			}xm',
1216 1216
             array(&$this, '_doCodeBlocks_callback'),
1217 1217
             $text
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
         $codeblock = preg_replace('/\A\n+|\n+\z/', '', $codeblock);
1232 1232
 
1233 1233
         $codeblock = "<pre><code>$codeblock\n</code></pre>";
1234
-        return "\n\n" . $this->hashBlock($codeblock) . "\n\n";
1234
+        return "\n\n".$this->hashBlock($codeblock)."\n\n";
1235 1235
     }
1236 1236
 
1237 1237
     function makeCodeSpan($code)
@@ -1280,7 +1280,7 @@  discard block
 block discarded – undo
1280 1280
                 $token_relist[] = $strong_re;
1281 1281
 
1282 1282
                 # Construct master expression from list.
1283
-                $token_re                                      = '{(' . implode('|', $token_relist) . ')}';
1283
+                $token_re                                      = '{('.implode('|', $token_relist).')}';
1284 1284
                 $this->em_strong_prepared_relist["$em$strong"] = $token_re;
1285 1285
             }
1286 1286
         }
@@ -1307,8 +1307,8 @@  discard block
 block discarded – undo
1307 1307
             #
1308 1308
             $parts = preg_split($token_re, $text, 2, PREG_SPLIT_DELIM_CAPTURE);
1309 1309
             $text_stack[0] .= $parts[0];
1310
-            $token =& $parts[1];
1311
-            $text  =& $parts[2];
1310
+            $token = & $parts[1];
1311
+            $text  = & $parts[2];
1312 1312
 
1313 1313
             if (empty($token)) {
1314 1314
                 # Reached end of text span: empty stack without emitting.
@@ -1445,7 +1445,7 @@  discard block
 block discarded – undo
1445 1445
             $bq
1446 1446
         );
1447 1447
 
1448
-        return "\n" . $this->hashBlock("<blockquote>\n$bq\n</blockquote>") . "\n\n";
1448
+        return "\n".$this->hashBlock("<blockquote>\n$bq\n</blockquote>")."\n\n";
1449 1449
     }
1450 1450
 
1451 1451
     function _doBlockQuotes_callback2($matches)
@@ -1470,7 +1470,7 @@  discard block
 block discarded – undo
1470 1470
         # Wrap <p> tags and unhashify HTML blocks
1471 1471
         #
1472 1472
         foreach ($grafs as $key => $value) {
1473
-            if (!preg_match('/^B\x1A[0-9]+B$/', $value)) {
1473
+            if ( ! preg_match('/^B\x1A[0-9]+B$/', $value)) {
1474 1474
                 # Is a paragraph.
1475 1475
                 $value = $this->runSpanGamut($value);
1476 1476
                 $value = preg_replace('/^([ ]*)/', "<p>", $value);
@@ -1551,7 +1551,7 @@  discard block
 block discarded – undo
1551 1551
                 '/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/',
1552 1552
                 '&amp;',
1553 1553
                 $text
1554
-            );;
1554
+            ); ;
1555 1555
         }
1556 1556
         # Encode remaining <'s
1557 1557
         $text = str_replace('<', '&lt;', $text);
@@ -1625,9 +1625,9 @@  discard block
 block discarded – undo
1625 1625
         #	Based by a filter by Matthew Wickline, posted to BBEdit-Talk.
1626 1626
         #   With some optimizations by Milian Wolff.
1627 1627
         #
1628
-        $addr  = "mailto:" . $addr;
1628
+        $addr  = "mailto:".$addr;
1629 1629
         $chars = preg_split('/(?<!^)(?!$)/', $addr);
1630
-        $seed  = (int)abs(crc32($addr) / strlen($addr)); # Deterministic seed.
1630
+        $seed  = (int) abs(crc32($addr) / strlen($addr)); # Deterministic seed.
1631 1631
 
1632 1632
         foreach ($chars as $key => $char) {
1633 1633
             $ord = ord($char);
@@ -1639,9 +1639,9 @@  discard block
 block discarded – undo
1639 1639
                 if ($r > 90 && $char != '@') /* do nothing */ {
1640 1640
                     ;
1641 1641
                 } else if ($r < 45) {
1642
-                    $chars[$key] = '&#x' . dechex($ord) . ';';
1642
+                    $chars[$key] = '&#x'.dechex($ord).';';
1643 1643
                 } else {
1644
-                    $chars[$key] = '&#' . $ord . ';';
1644
+                    $chars[$key] = '&#'.$ord.';';
1645 1645
                 }
1646 1646
             }
1647 1647
         }
@@ -1663,7 +1663,7 @@  discard block
 block discarded – undo
1663 1663
 
1664 1664
         $span_re = '{
1665 1665
 				(
1666
-					\\\\' . $this->escape_chars_re . '
1666
+					\\\\' . $this->escape_chars_re.'
1667 1667
 				|
1668 1668
 					(?<![`\\\\])
1669 1669
 					`+						# code span marker
@@ -1683,7 +1683,7 @@  discard block
 block discarded – undo
1683 1683
 					<[-a-zA-Z0-9:_]+\s*/> # xml-style empty tag
1684 1684
 				|
1685 1685
 					</[-a-zA-Z0-9:_]+\s*> # closing tag
1686
-			') . '
1686
+			').'
1687 1687
 				)
1688 1688
 				}xs';
1689 1689
 
@@ -1720,11 +1720,11 @@  discard block
 block discarded – undo
1720 1720
         #
1721 1721
         switch ($token{0}) {
1722 1722
             case "\\":
1723
-                return $this->hashPart("&#" . ord($token{1}) . ";");
1723
+                return $this->hashPart("&#".ord($token{1}).";");
1724 1724
             case "`":
1725 1725
                 # Search for end marker in remaining text.
1726 1726
                 if (preg_match(
1727
-                    '/^(.*?[^`])' . preg_quote($token) . '(?!`)(.*)$/sm',
1727
+                    '/^(.*?[^`])'.preg_quote($token).'(?!`)(.*)$/sm',
1728 1728
                     $str,
1729 1729
                     $matches
1730 1730
                 )) {
@@ -1743,7 +1743,7 @@  discard block
 block discarded – undo
1743 1743
         #
1744 1744
         # Remove one level of line-leading tabs or spaces
1745 1745
         #
1746
-        return preg_replace('/^(\t|[ ]{1,' . $this->tab_width . '})/m', '', $text);
1746
+        return preg_replace('/^(\t|[ ]{1,'.$this->tab_width.'})/m', '', $text);
1747 1747
     }
1748 1748
 
1749 1749
 
@@ -1783,7 +1783,7 @@  discard block
 block discarded – undo
1783 1783
             # Calculate amount of space, insert spaces, insert block.
1784 1784
             $amount = $this->tab_width -
1785 1785
                       $strlen($line, 'UTF-8') % $this->tab_width;
1786
-            $line .= str_repeat(" ", $amount) . $block;
1786
+            $line .= str_repeat(" ", $amount).$block;
1787 1787
         }
1788 1788
         return $line;
1789 1789
     }
@@ -1984,11 +1984,11 @@  discard block
 block discarded – undo
1984 1984
 
1985 1985
         # compose attributes as string
1986 1986
         $attr_str = "";
1987
-        if (!empty($id)) {
1988
-            $attr_str .= ' id="' . $id . '"';
1987
+        if ( ! empty($id)) {
1988
+            $attr_str .= ' id="'.$id.'"';
1989 1989
         }
1990
-        if (!empty($classes)) {
1991
-            $attr_str .= ' class="' . implode(" ", $classes) . '"';
1990
+        if ( ! empty($classes)) {
1991
+            $attr_str .= ' class="'.implode(" ", $classes).'"';
1992 1992
         }
1993 1993
         return $attr_str;
1994 1994
     }
@@ -2004,7 +2004,7 @@  discard block
 block discarded – undo
2004 2004
         # Link defs are in the form: ^[id]: url "optional title"
2005 2005
         $text = preg_replace_callback(
2006 2006
             '{
2007
-							^[ ]{0,' . $less_than_tab . '}\[(.+)\][ ]?:	# id = $1
2007
+							^[ ]{0,' . $less_than_tab.'}\[(.+)\][ ]?:	# id = $1
2008 2008
 							  [ ]*
2009 2009
 							  \n?				# maybe *one* newline
2010 2010
 							  [ ]*
@@ -2023,7 +2023,7 @@  discard block
 block discarded – undo
2023 2023
 								[")]
2024 2024
 								[ ]*
2025 2025
 							)?	# title is optional
2026
-					(?:[ ]* ' . $this->id_class_attr_catch_re . ' )?  # $5 = extra id & class attr
2026
+					(?:[ ]* ' . $this->id_class_attr_catch_re.' )?  # $5 = extra id & class attr
2027 2027
 							(?:\n+|\Z)
2028 2028
 			}xm',
2029 2029
             array(&$this, '_stripLinkDefinitions_callback'),
@@ -2037,8 +2037,8 @@  discard block
 block discarded – undo
2037 2037
         $link_id                  = strtolower($matches[1]);
2038 2038
         $url                      = $matches[2] == '' ? $matches[3] : $matches[2];
2039 2039
         $this->urls[$link_id]     = $url;
2040
-        $this->titles[$link_id]   =& $matches[4];
2041
-        $this->ref_attr[$link_id] = $this->doExtraAttributes("", $dummy =& $matches[5]);
2040
+        $this->titles[$link_id]   = & $matches[4];
2041
+        $this->ref_attr[$link_id] = $this->doExtraAttributes("", $dummy = & $matches[5]);
2042 2042
         return ''; # String that will replace the block
2043 2043
     }
2044 2044
 
@@ -2140,10 +2140,10 @@  discard block
 block discarded – undo
2140 2140
 				(					# $2: Capture whole tag.
2141 2141
 					</?					# Any opening or closing tag.
2142 2142
 						(?>				# Tag name.
2143
-							' . $this->block_tags_re . '			|
2144
-							' . $this->context_block_tags_re . '	|
2145
-							' . $this->clean_tags_re . '        	|
2146
-							(?!\s)' . $enclosing_tag_re . '
2143
+							' . $this->block_tags_re.'			|
2144
+							' . $this->context_block_tags_re.'	|
2145
+							' . $this->clean_tags_re.'        	|
2146
+							(?!\s)' . $enclosing_tag_re.'
2147 2147
 						)
2148 2148
 						(?:
2149 2149
 							(?=[\s"\'/a-zA-Z0-9])	# Allowed characters after tag name.
@@ -2163,27 +2163,27 @@  discard block
 block discarded – undo
2163 2163
 				|
2164 2164
 					# Code span marker
2165 2165
 					`+
2166
-				' . (!$span ? ' # If not in span.
2166
+				' . ( ! $span ? ' # If not in span.
2167 2167
 				|
2168 2168
 					# Indented code block
2169 2169
 					(?: ^[ ]*\n | ^ | \n[ ]*\n )
2170
-					[ ]{' . ($indent + 4) . '}[^\n]* \n
2170
+					[ ]{' . ($indent + 4).'}[^\n]* \n
2171 2171
 					(?>
2172
-						(?: [ ]{' . ($indent + 4) . '}[^\n]* | [ ]* ) \n
2172
+						(?: [ ]{' . ($indent + 4).'}[^\n]* | [ ]* ) \n
2173 2173
 					)*
2174 2174
 				|
2175 2175
 					# Fenced code block marker
2176 2176
 					(?<= ^ | \n )
2177
-					[ ]{0,' . ($indent + 3) . '}~{3,}
2177
+					[ ]{0,' . ($indent + 3).'}~{3,}
2178 2178
 									[ ]*
2179 2179
 					(?:
2180 2180
 					\.?[-_:a-zA-Z0-9]+ # standalone class name
2181 2181
 					|
2182
-						' . $this->id_class_attr_nocatch_re . ' # extra attributes
2182
+						' . $this->id_class_attr_nocatch_re.' # extra attributes
2183 2183
 					)?
2184 2184
 					[ ]*
2185 2185
 					\n
2186
-				' : '') . ' # End (if not is span).
2186
+				' : '').' # End (if not is span).
2187 2187
 				)
2188 2188
 			}xs';
2189 2189
 
@@ -2213,7 +2213,7 @@  discard block
 block discarded – undo
2213 2213
             if ($span) {
2214 2214
                 $void     = $this->hashPart("", ':');
2215 2215
                 $newline  = "$void\n";
2216
-                $parts[0] = $void . str_replace("\n", $newline, $parts[0]) . $void;
2216
+                $parts[0] = $void.str_replace("\n", $newline, $parts[0]).$void;
2217 2217
             }
2218 2218
 
2219 2219
             $parsed .= $parts[0]; # Text before current tag.
@@ -2235,12 +2235,12 @@  discard block
 block discarded – undo
2235 2235
                 # Find corresponding end marker.
2236 2236
                 $tag_re = preg_quote($tag);
2237 2237
                 if (preg_match(
2238
-                    '{^(?>.+?|\n(?!\n))*?(?<!`)' . $tag_re . '(?!`)}',
2238
+                    '{^(?>.+?|\n(?!\n))*?(?<!`)'.$tag_re.'(?!`)}',
2239 2239
                     $text,
2240 2240
                     $matches
2241 2241
                 )) {
2242 2242
                     # End marker found: pass text unchanged until marker.
2243
-                    $parsed .= $tag . $matches[0];
2243
+                    $parsed .= $tag.$matches[0];
2244 2244
                     $text = substr($text, strlen($matches[0]));
2245 2245
                 } else {
2246 2246
                     # Unmatched marker: just skip it.
@@ -2250,17 +2250,17 @@  discard block
 block discarded – undo
2250 2250
             #
2251 2251
             # Check for: Fenced code block marker.
2252 2252
             #
2253
-            else if (preg_match('{^\n?([ ]{0,' . ($indent + 3) . '})(~+)}', $tag, $capture)) {
2253
+            else if (preg_match('{^\n?([ ]{0,'.($indent + 3).'})(~+)}', $tag, $capture)) {
2254 2254
                 # Fenced code block marker: find matching end marker.
2255 2255
                 $fence_indent = strlen($capture[1]); # use captured indent in re
2256 2256
                 $fence_re     = $capture[2]; # use captured fence in re
2257 2257
                 if (preg_match(
2258
-                    '{^(?>.*\n)*?[ ]{' . ($fence_indent) . '}' . $fence_re . '[ ]*(?:\n|$)}',
2258
+                    '{^(?>.*\n)*?[ ]{'.($fence_indent).'}'.$fence_re.'[ ]*(?:\n|$)}',
2259 2259
                     $text,
2260 2260
                     $matches
2261 2261
                 )) {
2262 2262
                     # End marker found: pass text unchanged until marker.
2263
-                    $parsed .= $tag . $matches[0];
2263
+                    $parsed .= $tag.$matches[0];
2264 2264
                     $text = substr($text, strlen($matches[0]));
2265 2265
                 } else {
2266 2266
                     # No end marker: just skip it.
@@ -2280,14 +2280,14 @@  discard block
 block discarded – undo
2280 2280
             #            Opening Context Block tag (like ins and del)
2281 2281
             #               used as a block tag (tag is alone on it's line).
2282 2282
             #
2283
-            else if (preg_match('{^<(?:' . $this->block_tags_re . ')\b}', $tag) ||
2284
-                     (preg_match('{^<(?:' . $this->context_block_tags_re . ')\b}', $tag) &&
2283
+            else if (preg_match('{^<(?:'.$this->block_tags_re.')\b}', $tag) ||
2284
+                     (preg_match('{^<(?:'.$this->context_block_tags_re.')\b}', $tag) &&
2285 2285
                       preg_match($newline_before_re, $parsed) &&
2286 2286
                       preg_match($newline_after_re, $text))
2287 2287
             ) {
2288 2288
                 # Need to parse tag and following text using the HTML parser.
2289 2289
                 list($block_text, $text) =
2290
-                    $this->_hashHTMLBlocks_inHTML($tag . $text, "hashBlock", true);
2290
+                    $this->_hashHTMLBlocks_inHTML($tag.$text, "hashBlock", true);
2291 2291
 
2292 2292
                 # Make sure it stays outside of any paragraph by adding newlines.
2293 2293
                 $parsed .= "\n\n$block_text\n\n";
@@ -2296,13 +2296,13 @@  discard block
 block discarded – undo
2296 2296
             # Check for: Clean tag (like script, math)
2297 2297
             #            HTML Comments, processing instructions.
2298 2298
             #
2299
-            else if (preg_match('{^<(?:' . $this->clean_tags_re . ')\b}', $tag) ||
2299
+            else if (preg_match('{^<(?:'.$this->clean_tags_re.')\b}', $tag) ||
2300 2300
                      $tag{1} == '!' || $tag{1} == '?'
2301 2301
             ) {
2302 2302
                 # Need to parse tag and following text using the HTML parser.
2303 2303
                 # (don't check for markdown attribute)
2304 2304
                 list($block_text, $text) =
2305
-                    $this->_hashHTMLBlocks_inHTML($tag . $text, "hashClean", false);
2305
+                    $this->_hashHTMLBlocks_inHTML($tag.$text, "hashClean", false);
2306 2306
 
2307 2307
                 $parsed .= $block_text;
2308 2308
             }
@@ -2311,15 +2311,15 @@  discard block
 block discarded – undo
2311 2311
             #
2312 2312
             else if ($enclosing_tag_re !== '' &&
2313 2313
                      # Same name as enclosing tag.
2314
-                     preg_match('{^</?(?:' . $enclosing_tag_re . ')\b}', $tag)
2314
+                     preg_match('{^</?(?:'.$enclosing_tag_re.')\b}', $tag)
2315 2315
             ) {
2316 2316
                 #
2317 2317
                 # Increase/decrease nested tag count.
2318 2318
                 #
2319 2319
                 if ($tag{1} == '/') {
2320
-                    $depth --;
2320
+                    $depth--;
2321 2321
                 } else if ($tag{strlen($tag) - 2} != '/') {
2322
-                    $depth ++;
2322
+                    $depth++;
2323 2323
                 }
2324 2324
 
2325 2325
                 if ($depth < 0) {
@@ -2327,7 +2327,7 @@  discard block
 block discarded – undo
2327 2327
                     # Going out of parent element. Clean up and break so we
2328 2328
                     # return to the calling function.
2329 2329
                     #
2330
-                    $text = $tag . $text;
2330
+                    $text = $tag.$text;
2331 2331
                     break;
2332 2332
                 }
2333 2333
 
@@ -2439,7 +2439,7 @@  discard block
 block discarded – undo
2439 2439
             # Check for: Auto-close tag (like <hr/>)
2440 2440
             #			 Comments and Processing Instructions.
2441 2441
             #
2442
-            if (preg_match('{^</?(?:' . $this->auto_close_tags_re . ')\b}', $tag) ||
2442
+            if (preg_match('{^</?(?:'.$this->auto_close_tags_re.')\b}', $tag) ||
2443 2443
                 $tag{1} == '!' || $tag{1} == '?'
2444 2444
             ) {
2445 2445
                 # Just add the tag to the block as if it was text.
@@ -2449,11 +2449,11 @@  discard block
 block discarded – undo
2449 2449
                 # Increase/decrease nested tag count. Only do so if
2450 2450
                 # the tag's name match base tag's.
2451 2451
                 #
2452
-                if (preg_match('{^</?' . $base_tag_name_re . '\b}', $tag)) {
2452
+                if (preg_match('{^</?'.$base_tag_name_re.'\b}', $tag)) {
2453 2453
                     if ($tag{1} == '/') {
2454
-                        $depth --;
2454
+                        $depth--;
2455 2455
                     } else if ($tag{strlen($tag) - 2} != '/') {
2456
-                        $depth ++;
2456
+                        $depth++;
2457 2457
                     }
2458 2458
                 }
2459 2459
 
@@ -2462,16 +2462,16 @@  discard block
 block discarded – undo
2462 2462
                 #
2463 2463
                 if ($md_attr &&
2464 2464
                     preg_match($markdown_attr_re, $tag, $attr_m) &&
2465
-                    preg_match('/^1|block|span$/', $attr_m[2] . $attr_m[3])
2465
+                    preg_match('/^1|block|span$/', $attr_m[2].$attr_m[3])
2466 2466
                 ) {
2467 2467
                     # Remove `markdown` attribute from opening tag.
2468 2468
                     $tag = preg_replace($markdown_attr_re, '', $tag);
2469 2469
 
2470 2470
                     # Check if text inside this tag must be parsed in span mode.
2471
-                    $this->mode = $attr_m[2] . $attr_m[3];
2471
+                    $this->mode = $attr_m[2].$attr_m[3];
2472 2472
                     $span_mode  = $this->mode == 'span' || $this->mode != 'block' &&
2473 2473
                                                            preg_match(
2474
-                                                               '{^<(?:' . $this->contain_span_tags_re . ')\b}',
2474
+                                                               '{^<(?:'.$this->contain_span_tags_re.')\b}',
2475 2475
                                                                $tag
2476 2476
                                                            );
2477 2477
 
@@ -2511,7 +2511,7 @@  discard block
 block discarded – undo
2511 2511
                     }
2512 2512
 
2513 2513
                     # Append tag content to parsed text.
2514
-                    if (!$span_mode) {
2514
+                    if ( ! $span_mode) {
2515 2515
                         $parsed .= "\n\n$block_text\n\n";
2516 2516
                     } else {
2517 2517
                         $parsed .= "$block_text";
@@ -2560,7 +2560,7 @@  discard block
 block discarded – undo
2560 2560
             '{
2561 2561
 			(					# wrap whole match in $1
2562 2562
 			  \[
2563
-				(' . $this->nested_brackets_re . ')	# link text = $2
2563
+				(' . $this->nested_brackets_re.')	# link text = $2
2564 2564
 			  \]
2565 2565
 
2566 2566
 			  [ ]?				# one optional space
@@ -2582,14 +2582,14 @@  discard block
 block discarded – undo
2582 2582
             '{
2583 2583
 			(				# wrap whole match in $1
2584 2584
 			  \[
2585
-				(' . $this->nested_brackets_re . ')	# link text = $2
2585
+				(' . $this->nested_brackets_re.')	# link text = $2
2586 2586
 			  \]
2587 2587
 			  \(			# literal paren
2588 2588
 				[ \n]*
2589 2589
 				(?:
2590 2590
 					<(.+?)>	# href = $3
2591 2591
 				|
2592
-					(' . $this->nested_url_parenthesis_re . ')	# href = $4
2592
+					(' . $this->nested_url_parenthesis_re.')	# href = $4
2593 2593
 				)
2594 2594
 				[ \n]*
2595 2595
 				(			# $5
@@ -2599,7 +2599,7 @@  discard block
 block discarded – undo
2599 2599
 				  [ \n]*	# ignore any spaces/tabs between closing quote and )
2600 2600
 				)?			# title is optional
2601 2601
 			  \)
2602
-			  (?:[ ]? ' . $this->id_class_attr_catch_re . ' )?	 # $8 = id/class attributes
2602
+			  (?:[ ]? ' . $this->id_class_attr_catch_re.' )?	 # $8 = id/class attributes
2603 2603
 			)
2604 2604
 			}xs',
2605 2605
             array(&$this, '_doAnchors_inline_callback'),
@@ -2631,7 +2631,7 @@  discard block
 block discarded – undo
2631 2631
     {
2632 2632
         $whole_match = $matches[1];
2633 2633
         $link_text   = $matches[2];
2634
-        $link_id     =& $matches[3];
2634
+        $link_id     = & $matches[3];
2635 2635
 
2636 2636
         if ($link_id == "") {
2637 2637
             # for shortcut links like [this][] or [this].
@@ -2670,8 +2670,8 @@  discard block
 block discarded – undo
2670 2670
         $whole_match = $matches[1];
2671 2671
         $link_text   = $this->runSpanGamut($matches[2]);
2672 2672
         $url         = $matches[3] == '' ? $matches[4] : $matches[3];
2673
-        $title       =& $matches[7];
2674
-        $attr        = $this->doExtraAttributes("a", $dummy =& $matches[8]);
2673
+        $title       = & $matches[7];
2674
+        $attr        = $this->doExtraAttributes("a", $dummy = & $matches[8]);
2675 2675
 
2676 2676
         $url = $this->encodeAttribute($url);
2677 2677
 
@@ -2700,7 +2700,7 @@  discard block
 block discarded – undo
2700 2700
             '{
2701 2701
 			(				# wrap whole match in $1
2702 2702
 			  !\[
2703
-				(' . $this->nested_brackets_re . ')		# alt text = $2
2703
+				(' . $this->nested_brackets_re.')		# alt text = $2
2704 2704
 			  \]
2705 2705
 
2706 2706
 			  [ ]?				# one optional space
@@ -2724,7 +2724,7 @@  discard block
 block discarded – undo
2724 2724
             '{
2725 2725
 			(				# wrap whole match in $1
2726 2726
 			  !\[
2727
-				(' . $this->nested_brackets_re . ')		# alt text = $2
2727
+				(' . $this->nested_brackets_re.')		# alt text = $2
2728 2728
 			  \]
2729 2729
 			  \s?			# One optional whitespace character
2730 2730
 			  \(			# literal paren
@@ -2732,7 +2732,7 @@  discard block
 block discarded – undo
2732 2732
 				(?:
2733 2733
 					<(\S*)>	# src url = $3
2734 2734
 				|
2735
-					(' . $this->nested_url_parenthesis_re . ')	# src url = $4
2735
+					(' . $this->nested_url_parenthesis_re.')	# src url = $4
2736 2736
 				)
2737 2737
 				[ \n]*
2738 2738
 				(			# $5
@@ -2742,7 +2742,7 @@  discard block
 block discarded – undo
2742 2742
 				  [ \n]*
2743 2743
 				)?			# title is optional
2744 2744
 			  \)
2745
-			  (?:[ ]? ' . $this->id_class_attr_catch_re . ' )?	 # $8 = id/class attributes
2745
+			  (?:[ ]? ' . $this->id_class_attr_catch_re.' )?	 # $8 = id/class attributes
2746 2746
 			)
2747 2747
 			}xs',
2748 2748
             array(&$this, '_doImages_inline_callback'),
@@ -2789,8 +2789,8 @@  discard block
 block discarded – undo
2789 2789
         $whole_match = $matches[1];
2790 2790
         $alt_text    = $matches[2];
2791 2791
         $url         = $matches[3] == '' ? $matches[4] : $matches[3];
2792
-        $title       =& $matches[7];
2793
-        $attr        = $this->doExtraAttributes("img", $dummy =& $matches[8]);
2792
+        $title       = & $matches[7];
2793
+        $attr        = $this->doExtraAttributes("img", $dummy = & $matches[8]);
2794 2794
 
2795 2795
         $alt_text = $this->encodeAttribute($alt_text);
2796 2796
         $url      = $this->encodeAttribute($url);
@@ -2820,7 +2820,7 @@  discard block
 block discarded – undo
2820 2820
         $text = preg_replace_callback(
2821 2821
             '{
2822 2822
 				(^.+?)								# $1: Header text
2823
-				(?:[ ]+ ' . $this->id_class_attr_catch_re . ' )?	 # $3 = id/class attributes
2823
+				(?:[ ]+ ' . $this->id_class_attr_catch_re.' )?	 # $3 = id/class attributes
2824 2824
 				[ ]*\n(=+|-+)[ ]*\n+				# $3: Header footer
2825 2825
 			}mx',
2826 2826
             array(&$this, '_doHeaders_callback_setext'),
@@ -2841,7 +2841,7 @@  discard block
 block discarded – undo
2841 2841
 				(.+?)		# $2 = Header text
2842 2842
 				[ ]*
2843 2843
 				\#*			# optional closing #\'s (not counted)
2844
-				(?:[ ]+ ' . $this->id_class_attr_catch_re . ' )?	 # $3 = id/class attributes
2844
+				(?:[ ]+ ' . $this->id_class_attr_catch_re.' )?	 # $3 = id/class attributes
2845 2845
 				[ ]*
2846 2846
 				\n+
2847 2847
 			}xm',
@@ -2858,17 +2858,17 @@  discard block
 block discarded – undo
2858 2858
             return $matches[0];
2859 2859
         }
2860 2860
         $level = $matches[3]{0} == '=' ? 1 : 2;
2861
-        $attr  = $this->doExtraAttributes("h$level", $dummy =& $matches[2]);
2862
-        $block = "<h$level$attr>" . $this->runSpanGamut($matches[1]) . "</h$level>";
2863
-        return "\n" . $this->hashBlock($block) . "\n\n";
2861
+        $attr  = $this->doExtraAttributes("h$level", $dummy = & $matches[2]);
2862
+        $block = "<h$level$attr>".$this->runSpanGamut($matches[1])."</h$level>";
2863
+        return "\n".$this->hashBlock($block)."\n\n";
2864 2864
     }
2865 2865
 
2866 2866
     function _doHeaders_callback_atx($matches)
2867 2867
     {
2868 2868
         $level = strlen($matches[1]);
2869
-        $attr  = $this->doExtraAttributes("h$level", $dummy =& $matches[3]);
2870
-        $block = "<h$level$attr>" . $this->runSpanGamut($matches[2]) . "</h$level>";
2871
-        return "\n" . $this->hashBlock($block) . "\n\n";
2869
+        $attr  = $this->doExtraAttributes("h$level", $dummy = & $matches[3]);
2870
+        $block = "<h$level$attr>".$this->runSpanGamut($matches[2])."</h$level>";
2871
+        return "\n".$this->hashBlock($block)."\n\n";
2872 2872
     }
2873 2873
 
2874 2874
     function doTables($text)
@@ -2889,11 +2889,11 @@  discard block
 block discarded – undo
2889 2889
             '
2890 2890
 			{
2891 2891
 				^							# Start of a line
2892
-				[ ]{0,' . $less_than_tab . '}	# Allowed whitespace.
2892
+				[ ]{0,' . $less_than_tab.'}	# Allowed whitespace.
2893 2893
 				[|]							# Optional leading pipe (present)
2894 2894
 				(.+) \n						# $1: Header row (at least one pipe)
2895 2895
 
2896
-				[ ]{0,' . $less_than_tab . '}	# Allowed whitespace.
2896
+				[ ]{0,' . $less_than_tab.'}	# Allowed whitespace.
2897 2897
 				[|] ([ ]*[-:]+[-| :]*) \n	# $2: Header underline
2898 2898
 
2899 2899
 				(							# $3: Cells
@@ -2920,10 +2920,10 @@  discard block
 block discarded – undo
2920 2920
             '
2921 2921
 			{
2922 2922
 				^							# Start of a line
2923
-				[ ]{0,' . $less_than_tab . '}	# Allowed whitespace.
2923
+				[ ]{0,' . $less_than_tab.'}	# Allowed whitespace.
2924 2924
 				(\S.*[|].*) \n				# $1: Header row (at least one pipe)
2925 2925
 
2926
-				[ ]{0,' . $less_than_tab . '}	# Allowed whitespace.
2926
+				[ ]{0,' . $less_than_tab.'}	# Allowed whitespace.
2927 2927
 				([-:]+[ ]*[|][-| :]*) \n	# $2: Header underline
2928 2928
 
2929 2929
 				(							# $3: Cells
@@ -2989,7 +2989,7 @@  discard block
 block discarded – undo
2989 2989
         $text .= "<thead>\n";
2990 2990
         $text .= "<tr>\n";
2991 2991
         foreach ($headers as $n => $header) {
2992
-            $text .= "  <th$attr[$n]>" . $this->runSpanGamut(trim($header)) . "</th>\n";
2992
+            $text .= "  <th$attr[$n]>".$this->runSpanGamut(trim($header))."</th>\n";
2993 2993
         }
2994 2994
         $text .= "</tr>\n";
2995 2995
         $text .= "</thead>\n";
@@ -3009,14 +3009,14 @@  discard block
 block discarded – undo
3009 3009
 
3010 3010
             $text .= "<tr>\n";
3011 3011
             foreach ($row_cells as $n => $cell) {
3012
-                $text .= "  <td$attr[$n]>" . $this->runSpanGamut(trim($cell)) . "</td>\n";
3012
+                $text .= "  <td$attr[$n]>".$this->runSpanGamut(trim($cell))."</td>\n";
3013 3013
             }
3014 3014
             $text .= "</tr>\n";
3015 3015
         }
3016 3016
         $text .= "</tbody>\n";
3017 3017
         $text .= "</table>";
3018 3018
 
3019
-        return $this->hashBlock($text) . "\n";
3019
+        return $this->hashBlock($text)."\n";
3020 3020
     }
3021 3021
 
3022 3022
     function doDefLists($text)
@@ -3030,10 +3030,10 @@  discard block
 block discarded – undo
3030 3030
         $whole_list_re = '(?>
3031 3031
 			(								# $1 = whole list
3032 3032
 			  (								# $2
3033
-				[ ]{0,' . $less_than_tab . '}
3033
+				[ ]{0,' . $less_than_tab.'}
3034 3034
 				((?>.*\S.*\n)+)				# $3 = defined term
3035 3035
 				\n?
3036
-				[ ]{0,' . $less_than_tab . '}:[ ]+ # colon starting definition
3036
+				[ ]{0,' . $less_than_tab.'}:[ ]+ # colon starting definition
3037 3037
 			  )
3038 3038
 			  (?s:.+?)
3039 3039
 			  (								# $4
@@ -3042,13 +3042,13 @@  discard block
 block discarded – undo
3042 3042
 				  \n{2,}
3043 3043
 				  (?=\S)
3044 3044
 				  (?!						# Negative lookahead for another term
3045
-					[ ]{0,' . $less_than_tab . '}
3045
+					[ ]{0,' . $less_than_tab.'}
3046 3046
 					(?: \S.*\n )+?			# defined term
3047 3047
 					\n?
3048
-					[ ]{0,' . $less_than_tab . '}:[ ]+ # colon starting definition
3048
+					[ ]{0,' . $less_than_tab.'}:[ ]+ # colon starting definition
3049 3049
 				  )
3050 3050
 				  (?!						# Negative lookahead for another definition
3051
-					[ ]{0,' . $less_than_tab . '}:[ ]+ # colon starting definition
3051
+					[ ]{0,' . $less_than_tab.'}:[ ]+ # colon starting definition
3052 3052
 				  )
3053 3053
 			  )
3054 3054
 			)
@@ -3057,7 +3057,7 @@  discard block
 block discarded – undo
3057 3057
         $text = preg_replace_callback(
3058 3058
             '{
3059 3059
 				(?>\A\n?|(?<=\n\n))
3060
-				' . $whole_list_re . '
3060
+				' . $whole_list_re.'
3061 3061
 			}mx',
3062 3062
             array(&$this, '_doDefLists_callback'),
3063 3063
             $text
@@ -3074,8 +3074,8 @@  discard block
 block discarded – undo
3074 3074
         # Turn double returns into triple returns, so that we can make a
3075 3075
         # paragraph for the last item in a list, if necessary:
3076 3076
         $result = trim($this->processDefListItems($list));
3077
-        $result = "<dl>\n" . $result . "\n</dl>";
3078
-        return $this->hashBlock($result) . "\n\n";
3077
+        $result = "<dl>\n".$result."\n</dl>";
3078
+        return $this->hashBlock($result)."\n\n";
3079 3079
     }
3080 3080
 
3081 3081
     function processDefListItems($list_str)
@@ -3094,7 +3094,7 @@  discard block
 block discarded – undo
3094 3094
             '{
3095 3095
 			(?>\A\n?|\n\n+)					# leading line
3096 3096
 			(								# definition terms = $1
3097
-				[ ]{0,' . $less_than_tab . '}	# leading whitespace
3097
+				[ ]{0,' . $less_than_tab.'}	# leading whitespace
3098 3098
 				(?!\:[ ]|[ ])				# negative lookahead for a definition
3099 3099
 											#   mark (colon) or more whitespace.
3100 3100
 				(?> \S.* \n)+?				# actual term (not whitespace).
@@ -3111,13 +3111,13 @@  discard block
 block discarded – undo
3111 3111
             '{
3112 3112
 			\n(\n+)?						# leading line = $1
3113 3113
 			(								# marker space = $2
3114
-				[ ]{0,' . $less_than_tab . '}	# whitespace before colon
3114
+				[ ]{0,' . $less_than_tab.'}	# whitespace before colon
3115 3115
 				\:[ ]+						# definition mark (colon)
3116 3116
 			)
3117 3117
 			((?s:.+?))						# definition text = $3
3118 3118
 			(?= \n+ 						# stop at next definition mark,
3119 3119
 				(?:							# next term or end of text
3120
-					[ ]{0,' . $less_than_tab . '} \:[ ]	|
3120
+					[ ]{0,' . $less_than_tab.'} \:[ ]	|
3121 3121
 					<dt> | \z
3122 3122
 				)
3123 3123
 			)
@@ -3135,9 +3135,9 @@  discard block
 block discarded – undo
3135 3135
         $text  = '';
3136 3136
         foreach ($terms as $term) {
3137 3137
             $term = $this->runSpanGamut(trim($term));
3138
-            $text .= "\n<dt>" . $term . "</dt>";
3138
+            $text .= "\n<dt>".$term."</dt>";
3139 3139
         }
3140
-        return $text . "\n";
3140
+        return $text."\n";
3141 3141
     }
3142 3142
 
3143 3143
     function _processDefListItems_callback_dd($matches)
@@ -3148,15 +3148,15 @@  discard block
 block discarded – undo
3148 3148
 
3149 3149
         if ($leading_line || preg_match('/\n{2,}/', $def)) {
3150 3150
             # Replace marker with the appropriate whitespace indentation
3151
-            $def = str_repeat(' ', strlen($marker_space)) . $def;
3152
-            $def = $this->runBlockGamut($this->outdent($def . "\n\n"));
3153
-            $def = "\n" . $def . "\n";
3151
+            $def = str_repeat(' ', strlen($marker_space)).$def;
3152
+            $def = $this->runBlockGamut($this->outdent($def."\n\n"));
3153
+            $def = "\n".$def."\n";
3154 3154
         } else {
3155 3155
             $def = rtrim($def);
3156 3156
             $def = $this->runSpanGamut($this->outdent($def));
3157 3157
         }
3158 3158
 
3159
-        return "\n<dd>" . $def . "</dd>\n";
3159
+        return "\n<dd>".$def."</dd>\n";
3160 3160
     }
3161 3161
 
3162 3162
     function doFencedCodeBlocks($text)
@@ -3181,7 +3181,7 @@  discard block
 block discarded – undo
3181 3181
 				(?:
3182 3182
 					\.?([-_:a-zA-Z0-9]+) # 2: standalone class name
3183 3183
 				|
3184
-					' . $this->id_class_attr_catch_re . ' # 3: Extra attributes
3184
+					' . $this->id_class_attr_catch_re.' # 3: Extra attributes
3185 3185
 				)?
3186 3186
 				[ ]* \n # Whitespace and newline following marker.
3187 3187
 
@@ -3205,8 +3205,8 @@  discard block
 block discarded – undo
3205 3205
 
3206 3206
     function _doFencedCodeBlocks_callback($matches)
3207 3207
     {
3208
-        $classname =& $matches[2];
3209
-        $attrs     =& $matches[3];
3208
+        $classname = & $matches[2];
3209
+        $attrs     = & $matches[3];
3210 3210
         $codeblock = $matches[4];
3211 3211
         $codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
3212 3212
         $codeblock = preg_replace_callback(
@@ -3219,7 +3219,7 @@  discard block
 block discarded – undo
3219 3219
             if ($classname{0} == '.') {
3220 3220
                 $classname = substr($classname, 1);
3221 3221
             }
3222
-            $attr_str = ' class="' . $this->code_class_prefix . $classname . '"';
3222
+            $attr_str = ' class="'.$this->code_class_prefix.$classname.'"';
3223 3223
         } else {
3224 3224
             $attr_str = $this->doExtraAttributes($this->code_attr_on_pre ? "pre" : "code", $attrs);
3225 3225
         }
@@ -3227,7 +3227,7 @@  discard block
 block discarded – undo
3227 3227
         $code_attr_str = $this->code_attr_on_pre ? '' : $attr_str;
3228 3228
         $codeblock     = "<pre$pre_attr_str><code$code_attr_str>$codeblock</code></pre>";
3229 3229
 
3230
-        return "\n\n" . $this->hashBlock($codeblock) . "\n\n";
3230
+        return "\n\n".$this->hashBlock($codeblock)."\n\n";
3231 3231
     }
3232 3232
 
3233 3233
     function _doFencedCodeBlocks_newlines($matches)
@@ -3280,7 +3280,7 @@  discard block
 block discarded – undo
3280 3280
 
3281 3281
             # Check if this should be enclosed in a paragraph.
3282 3282
             # Clean tag hashes & block tag hashes are left alone.
3283
-            $is_p = !preg_match('/^B\x1A[0-9]+B|^C\x1A[0-9]+C$/', $value);
3283
+            $is_p = ! preg_match('/^B\x1A[0-9]+B|^C\x1A[0-9]+C$/', $value);
3284 3284
 
3285 3285
             if ($is_p) {
3286 3286
                 $value = "<p>$value</p>";
@@ -3310,7 +3310,7 @@  discard block
 block discarded – undo
3310 3310
         # Link defs are in the form: [^id]: url "optional title"
3311 3311
         $text = preg_replace_callback(
3312 3312
             '{
3313
-			^[ ]{0,' . $less_than_tab . '}\[\^(.+?)\][ ]?:	# note_id = $1
3313
+			^[ ]{0,' . $less_than_tab.'}\[\^(.+?)\][ ]?:	# note_id = $1
3314 3314
 			  [ ]*
3315 3315
 			  \n?					# maybe *one* newline
3316 3316
 			(						# text = $2 (no blank lines allowed)
@@ -3332,7 +3332,7 @@  discard block
 block discarded – undo
3332 3332
 
3333 3333
     function _stripFootnotes_callback($matches)
3334 3334
     {
3335
-        $note_id                   = $this->fn_id_prefix . $matches[1];
3335
+        $note_id                   = $this->fn_id_prefix.$matches[1];
3336 3336
         $this->footnotes[$note_id] = $this->outdent($matches[2]);
3337 3337
         return ''; # String that will replace the block
3338 3338
     }
@@ -3343,7 +3343,7 @@  discard block
 block discarded – undo
3343 3343
         # Replace footnote references in $text [^id] with a special text-token
3344 3344
         # which will be replaced by the actual footnote marker in appendFootnotes.
3345 3345
         #
3346
-        if (!$this->in_anchor) {
3346
+        if ( ! $this->in_anchor) {
3347 3347
             $text = preg_replace('{\[\^(.+?)\]}', "F\x1Afn:\\1\x1A:", $text);
3348 3348
         }
3349 3349
         return $text;
@@ -3360,10 +3360,10 @@  discard block
 block discarded – undo
3360 3360
             $text
3361 3361
         );
3362 3362
 
3363
-        if (!empty($this->footnotes_ordered)) {
3363
+        if ( ! empty($this->footnotes_ordered)) {
3364 3364
             $text .= "\n\n";
3365 3365
             $text .= "<div class=\"footnotes\">\n";
3366
-            $text .= "<hr" . $this->empty_element_suffix . "\n";
3366
+            $text .= "<hr".$this->empty_element_suffix."\n";
3367 3367
             $text .= "<ol>\n\n";
3368 3368
 
3369 3369
             $attr = " rev=\"footnote\"";
@@ -3379,7 +3379,7 @@  discard block
 block discarded – undo
3379 3379
             }
3380 3380
             $num = 0;
3381 3381
 
3382
-            while (!empty($this->footnotes_ordered)) {
3382
+            while ( ! empty($this->footnotes_ordered)) {
3383 3383
                 $footnote = reset($this->footnotes_ordered);
3384 3384
                 $note_id  = key($this->footnotes_ordered);
3385 3385
                 unset($this->footnotes_ordered[$note_id]);
@@ -3405,13 +3405,13 @@  discard block
 block discarded – undo
3405 3405
                 }
3406 3406
                 # Add backlink to last paragraph; create new paragraph if needed.
3407 3407
                 if (preg_match('{</p>$}', $footnote)) {
3408
-                    $footnote = substr($footnote, 0, - 4) . "&#160;$backlink</p>";
3408
+                    $footnote = substr($footnote, 0, - 4)."&#160;$backlink</p>";
3409 3409
                 } else {
3410 3410
                     $footnote .= "\n\n<p>$backlink</p>";
3411 3411
                 }
3412 3412
 
3413 3413
                 $text .= "<li id=\"fn:$note_id\">\n";
3414
-                $text .= $footnote . "\n";
3414
+                $text .= $footnote."\n";
3415 3415
                 $text .= "</li>\n\n";
3416 3416
             }
3417 3417
 
@@ -3423,18 +3423,18 @@  discard block
 block discarded – undo
3423 3423
 
3424 3424
     function _appendFootnotes_callback($matches)
3425 3425
     {
3426
-        $node_id = $this->fn_id_prefix . $matches[1];
3426
+        $node_id = $this->fn_id_prefix.$matches[1];
3427 3427
 
3428 3428
         # Create footnote marker only if it has a corresponding footnote *and*
3429 3429
         # the footnote hasn't been used by another marker.
3430 3430
         if (isset($this->footnotes[$node_id])) {
3431
-            $num =& $this->footnotes_numbers[$node_id];
3432
-            if (!isset($num)) {
3431
+            $num = & $this->footnotes_numbers[$node_id];
3432
+            if ( ! isset($num)) {
3433 3433
                 # Transfer footnote content to the ordered list and give it its
3434 3434
                 # number
3435 3435
                 $this->footnotes_ordered[$node_id]   = $this->footnotes[$node_id];
3436 3436
                 $this->footnotes_ref_count[$node_id] = 1;
3437
-                $num                                 = $this->footnote_counter ++;
3437
+                $num                                 = $this->footnote_counter++;
3438 3438
                 $ref_count_mark                      = '';
3439 3439
             } else {
3440 3440
                 $ref_count_mark = $this->footnotes_ref_count[$node_id] += 1;
@@ -3456,12 +3456,12 @@  discard block
 block discarded – undo
3456 3456
             $node_id = $this->encodeAttribute($node_id);
3457 3457
 
3458 3458
             return
3459
-                "<sup id=\"fnref$ref_count_mark:$node_id\">" .
3460
-                "<a href=\"#fn:$node_id\"$attr>$num</a>" .
3459
+                "<sup id=\"fnref$ref_count_mark:$node_id\">".
3460
+                "<a href=\"#fn:$node_id\"$attr>$num</a>".
3461 3461
                 "</sup>";
3462 3462
         }
3463 3463
 
3464
-        return "[^" . $matches[1] . "]";
3464
+        return "[^".$matches[1]."]";
3465 3465
     }
3466 3466
 
3467 3467
     ### Abbreviations ###
@@ -3476,7 +3476,7 @@  discard block
 block discarded – undo
3476 3476
         # Link defs are in the form: [id]*: url "optional title"
3477 3477
         $text = preg_replace_callback(
3478 3478
             '{
3479
-			^[ ]{0,' . $less_than_tab . '}\*\[(.+?)\][ ]?:	# abbr_id = $1
3479
+			^[ ]{0,' . $less_than_tab.'}\*\[(.+?)\][ ]?:	# abbr_id = $1
3480 3480
 			(.*)					# text = $2 (no blank lines allowed)
3481 3481
 			}xm',
3482 3482
             array(&$this, '_stripAbbreviations_callback'),
@@ -3506,10 +3506,10 @@  discard block
 block discarded – undo
3506 3506
             // cannot use the /x modifier because abbr_word_re may
3507 3507
             // contain significant spaces:
3508 3508
             $text = preg_replace_callback(
3509
-                '{' .
3510
-                '(?<![\w\x1A])' .
3511
-                '(?:' . $this->abbr_word_re . ')' .
3512
-                '(?![\w\x1A])' .
3509
+                '{'.
3510
+                '(?<![\w\x1A])'.
3511
+                '(?:'.$this->abbr_word_re.')'.
3512
+                '(?![\w\x1A])'.
3513 3513
                 '}',
3514 3514
                 array(&$this, '_doAbbreviations_callback'),
3515 3515
                 $text
Please login to merge, or discard this patch.
application/language/english/application_lang.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 $lang['cron.invalid_task']      = 'Not a valid task.';
36 36
 $lang['cron.running_task']      = "Running task: %s...";
37 37
 $lang['cron.done_with_msg']     = "Done with message:\n%s\n";
38
-$lang['cron.not_scheduled_until']   = "'%s' Not scheduled to run until %s.";
38
+$lang['cron.not_scheduled_until'] = "'%s' Not scheduled to run until %s.";
39 39
 $lang['cron.nothing_scheduled'] = "No Tasks scheduled to run currently.";
40 40
 
41 41
 // Forge
Please login to merge, or discard this patch.
application/libraries/MY_Form_validation.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! class_exists('MY_Form_validation'))
3
+if ( ! class_exists('MY_Form_validation'))
4 4
 {
5 5
 
6 6
     class MY_Form_validation extends CI_Form_validation {
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
          *
19 19
          * @return bool
20 20
          */
21
-        public function has_error( $field = NULL )
21
+        public function has_error($field = NULL)
22 22
         {
23
-            if ( empty( $field ) )
23
+            if (empty($field))
24 24
             {
25 25
                 return FALSE;
26 26
             }
27 27
 
28
-            return ! empty( $this->_field_data[ $field ]['error'] );
28
+            return ! empty($this->_field_data[$field]['error']);
29 29
         }
30 30
 
31 31
         //--------------------------------------------------------------------
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
          */
41 41
         public function run($group = '', $module = '')
42 42
         {
43
-            is_object($module) && $this->CI =& $module;
43
+            is_object($module) && $this->CI = & $module;
44 44
             return parent::run($group);
45 45
         }
46 46
 
@@ -67,47 +67,47 @@  discard block
 block discarded – undo
67 67
          *
68 68
          * @return bool True if the value is unique for that field, else false.
69 69
          */
70
-        public function is_unique( $value, $params )
70
+        public function is_unique($value, $params)
71 71
         {
72
-            if ( empty( $this->CI->db ) )
72
+            if (empty($this->CI->db))
73 73
             {
74 74
                 $this->CI->load->database();
75 75
             }
76 76
 
77 77
             // Allow for more than 1 parameter.
78
-            $fields = explode( ",", $params );
78
+            $fields = explode(",", $params);
79 79
 
80 80
             // Extract the table and field from the first parameter.
81
-            list( $table, $field ) = explode( '.', $fields[0], 2 );
81
+            list($table, $field) = explode('.', $fields[0], 2);
82 82
 
83 83
             // Setup the db request.
84
-            $this->CI->db->select( $field )
85
-                         ->from( $table )
86
-                         ->where( $field, $value )
87
-                         ->limit( 1 );
84
+            $this->CI->db->select($field)
85
+                         ->from($table)
86
+                         ->where($field, $value)
87
+                         ->limit(1);
88 88
 
89 89
             // Check whether a second parameter was passed to be used as an
90 90
             // "AND NOT EQUAL" where clause
91 91
             // eg "select * from users where users.name='test' AND users.id != 4
92
-            if ( isset( $fields[1] ) )
92
+            if (isset($fields[1]))
93 93
             {
94 94
                 // Extract the table and field from the second parameter
95
-                list( $where_table, $where_field ) = explode( '.', $fields[1], 2 );
95
+                list($where_table, $where_field) = explode('.', $fields[1], 2);
96 96
 
97 97
                 // Get the value from the post's $where_field. If the value is set,
98 98
                 // add "AND NOT EQUAL" where clause.
99
-                $where_value = $this->CI->input->post( $where_field );
100
-                if ( isset( $where_value ) )
99
+                $where_value = $this->CI->input->post($where_field);
100
+                if (isset($where_value))
101 101
                 {
102
-                    $this->CI->db->where( "{$where_table}.{$where_field} !=", $where_value );
102
+                    $this->CI->db->where("{$where_table}.{$where_field} !=", $where_value);
103 103
                 }
104 104
             }
105 105
 
106 106
             // If any rows are returned from the database, validation fails
107 107
             $query = $this->CI->db->get();
108
-            if ( $query->row() )
108
+            if ($query->row())
109 109
             {
110
-                $this->CI->form_validation->set_message( 'unique', 'The %s field is already in use.' );
110
+                $this->CI->form_validation->set_message('unique', 'The %s field is already in use.');
111 111
 
112 112
                 return FALSE;
113 113
             }
Please login to merge, or discard this patch.