@@ -103,7 +103,7 @@ |
||
| 103 | 103 | break; |
| 104 | 104 | } |
| 105 | 105 | // This is safe because we removed the token that triggered this. |
| 106 | - $this->rewindOffset($b+$deleted); |
|
| 106 | + $this->rewindOffset($b + $deleted); |
|
| 107 | 107 | return; |
| 108 | 108 | } |
| 109 | 109 | } |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | if (isset($def->isAlias)) { |
| 320 | 320 | if ($this->aliasMode) { |
| 321 | 321 | $this->triggerError( |
| 322 | - 'Double-aliases not allowed, please fix '. |
|
| 322 | + 'Double-aliases not allowed, please fix ' . |
|
| 323 | 323 | 'ConfigSchema bug with' . $key, |
| 324 | 324 | E_USER_ERROR |
| 325 | 325 | ); |
@@ -535,8 +535,7 @@ discard block |
||
| 535 | 535 | $def = $this->definitions[$type]; |
| 536 | 536 | if ($def->setup && !$optimized) { |
| 537 | 537 | $extra = $this->chatty ? |
| 538 | - " (try moving this code block earlier in your initialization)" : |
|
| 539 | - ""; |
|
| 538 | + " (try moving this code block earlier in your initialization)" : ""; |
|
| 540 | 539 | throw new HTMLPurifier_Exception( |
| 541 | 540 | "Cannot retrieve raw definition after it has already been setup" . |
| 542 | 541 | $extra |
@@ -689,7 +688,7 @@ discard block |
||
| 689 | 688 | $namespace = $key; |
| 690 | 689 | $namespace_values = $value; |
| 691 | 690 | foreach ($namespace_values as $directive => $value2) { |
| 692 | - $this->set($namespace .'.'. $directive, $value2); |
|
| 691 | + $this->set($namespace . '.' . $directive, $value2); |
|
| 693 | 692 | } |
| 694 | 693 | } |
| 695 | 694 | } |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | // two loop iterations |
| 226 | 226 | for ($i = 0, $c = count($basic_selectors); $i < $c; $i++) { |
| 227 | 227 | $x = $basic_selectors[$i]; |
| 228 | - if ($i % 2) { |
|
| 228 | + if ($i%2) { |
|
| 229 | 229 | // delimiter |
| 230 | 230 | if ($x === ' ') { |
| 231 | 231 | $delim = ' '; |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | // in which case we ignore the |
| 250 | 250 | // outer $delim |
| 251 | 251 | } |
| 252 | - } elseif ($j % 2) { |
|
| 252 | + } elseif ($j%2) { |
|
| 253 | 253 | // set delimiter |
| 254 | 254 | $sdelim = $y; |
| 255 | 255 | } else { |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | |
| 54 | 54 | // number is really a positive integer (one or more digits) |
| 55 | 55 | // FIXME: ^^ not always, see start and value of list items |
| 56 | - $this->info['Number'] = new HTMLPurifier_AttrDef_Integer(false, false, true); |
|
| 56 | + $this->info['Number'] = new HTMLPurifier_AttrDef_Integer(false, false, true); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | private static function makeEnum($in) |
@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | // Regexp is as per Appendix B. |
| 31 | 31 | // Note that ["<>] are an addition to the RFC's recommended |
| 32 | 32 | // characters, because they represent external delimeters. |
| 33 | - $r_URI = '!'. |
|
| 34 | - '(([a-zA-Z0-9\.\+\-]+):)?'. // 2. Scheme |
|
| 35 | - '(//([^/?#"<>]*))?'. // 4. Authority |
|
| 36 | - '([^?#"<>]*)'. // 5. Path |
|
| 37 | - '(\?([^#"<>]*))?'. // 7. Query |
|
| 38 | - '(#([^"<>]*))?'. // 8. Fragment |
|
| 33 | + $r_URI = '!' . |
|
| 34 | + '(([a-zA-Z0-9\.\+\-]+):)?' . // 2. Scheme |
|
| 35 | + '(//([^/?#"<>]*))?' . // 4. Authority |
|
| 36 | + '([^?#"<>]*)' . // 5. Path |
|
| 37 | + '(\?([^#"<>]*))?' . // 7. Query |
|
| 38 | + '(#([^"<>]*))?' . // 8. Fragment |
|
| 39 | 39 | '!'; |
| 40 | 40 | |
| 41 | 41 | $matches = array(); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | preg_match($r_authority, $authority, $matches); |
| 58 | 58 | $userinfo = !empty($matches[1]) ? $matches[2] : null; |
| 59 | 59 | $host = !empty($matches[3]) ? $matches[3] : ''; |
| 60 | - $port = !empty($matches[4]) ? (int) $matches[5] : null; |
|
| 60 | + $port = !empty($matches[4]) ? (int)$matches[5] : null; |
|
| 61 | 61 | } else { |
| 62 | 62 | $port = $host = $userinfo = null; |
| 63 | 63 | } |
@@ -164,9 +164,9 @@ |
||
| 164 | 164 | public function postProcess() |
| 165 | 165 | { |
| 166 | 166 | foreach ($this->info as $key => $v) { |
| 167 | - if (count((array) $v) == 1) { |
|
| 167 | + if (count((array)$v) == 1) { |
|
| 168 | 168 | $this->info[$key] = $v->type; |
| 169 | - } elseif (count((array) $v) == 2 && isset($v->allow_null)) { |
|
| 169 | + } elseif (count((array)$v) == 2 && isset($v->allow_null)) { |
|
| 170 | 170 | $this->info[$key] = -$v->type; |
| 171 | 171 | } |
| 172 | 172 | } |
@@ -385,7 +385,7 @@ |
||
| 385 | 385 | case 1: |
| 386 | 386 | $attribute = htmlspecialchars($bits[0]); |
| 387 | 387 | trigger_error( |
| 388 | - "Global attribute '$attribute' is not ". |
|
| 388 | + "Global attribute '$attribute' is not " . |
|
| 389 | 389 | "supported in any elements $support", |
| 390 | 390 | E_USER_WARNING |
| 391 | 391 | ); |
@@ -56,10 +56,10 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function __construct($context) |
| 58 | 58 | { |
| 59 | - $this->locale =& $context->get('Locale'); |
|
| 59 | + $this->locale = & $context->get('Locale'); |
|
| 60 | 60 | $this->context = $context; |
| 61 | - $this->_current =& $this->_stacks[0]; |
|
| 62 | - $this->errors =& $this->_stacks[0]; |
|
| 61 | + $this->_current = & $this->_stacks[0]; |
|
| 62 | + $this->errors = & $this->_stacks[0]; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $token = $this->context->get('CurrentToken', true); |
| 80 | 80 | $line = $token ? $token->line : $this->context->get('CurrentLine', true); |
| 81 | - $col = $token ? $token->col : $this->context->get('CurrentCol', true); |
|
| 81 | + $col = $token ? $token->col : $this->context->get('CurrentCol', true); |
|
| 82 | 82 | $attr = $this->context->get('CurrentAttr', true); |
| 83 | 83 | |
| 84 | 84 | // perform special substitutions, also add custom parameters |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | ); |
| 31 | 31 | return; |
| 32 | 32 | } |
| 33 | - $this->_storage[$name] =& $ref; |
|
| 33 | + $this->_storage[$name] = & $ref; |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |