@@ -61,7 +61,7 @@ |
||
61 | 61 | if ($status !== false) { |
62 | 62 | continue; |
63 | 63 | } |
64 | - $r = $this->info['list-style-' . $key]->validate($bit, $config, $context); |
|
64 | + $r = $this->info['list-style-'.$key]->validate($bit, $config, $context); |
|
65 | 65 | if ($r === false) { |
66 | 66 | continue; |
67 | 67 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | if ($result === false) { |
21 | 21 | return $result; |
22 | 22 | } |
23 | - $float = (float)$result; |
|
23 | + $float = (float) $result; |
|
24 | 24 | if ($float < 0.0) { |
25 | 25 | $result = '0'; |
26 | 26 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | } |
44 | 44 | $r = $validator->validate($bit, $config, $context); |
45 | 45 | if ($r !== false) { |
46 | - $ret .= $r . ' '; |
|
46 | + $ret .= $r.' '; |
|
47 | 47 | $done[$propname] = true; |
48 | 48 | break; |
49 | 49 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | if ($status !== false) { |
66 | 66 | continue; |
67 | 67 | } |
68 | - $r = $this->info['background-' . $key]->validate($bit, $config, $context); |
|
68 | + $r = $this->info['background-'.$key]->validate($bit, $config, $context); |
|
69 | 69 | } else { |
70 | 70 | $r = $bit; |
71 | 71 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | if ($caught[$key] === false) { |
77 | 77 | $caught[$key] = ''; |
78 | 78 | } |
79 | - $caught[$key] .= $r . ' '; |
|
79 | + $caught[$key] .= $r.' '; |
|
80 | 80 | } else { |
81 | 81 | $caught[$key] = $r; |
82 | 82 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | // match a generic name |
75 | 75 | if (isset($generic_names[$font])) { |
76 | 76 | if ($allowed_fonts === null || isset($allowed_fonts[$font])) { |
77 | - $final .= $font . ', '; |
|
77 | + $final .= $font.', '; |
|
78 | 78 | } |
79 | 79 | continue; |
80 | 80 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | if (ctype_alnum($font) && $font !== '') { |
103 | 103 | // very simple font, allow it in unharmed |
104 | - $final .= $font . ', '; |
|
104 | + $final .= $font.', '; |
|
105 | 105 | continue; |
106 | 106 | } |
107 | 107 |
@@ -58,7 +58,7 @@ |
||
58 | 58 | if ($value === false) { |
59 | 59 | continue; |
60 | 60 | } |
61 | - $int = (int)$value; |
|
61 | + $int = (int) $value; |
|
62 | 62 | if ($int > 100) { |
63 | 63 | $value = '100'; |
64 | 64 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $final = ''; |
33 | 33 | foreach ($parts as $part) { |
34 | 34 | if (isset($allowed_values[$part])) { |
35 | - $final .= $part . ' '; |
|
35 | + $final .= $part.' '; |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | $final = rtrim($final); |
@@ -61,7 +61,7 @@ |
||
61 | 61 | 'a', |
62 | 62 | array('href' => str_replace('%s', $bits[$i], $this->docURL)) |
63 | 63 | ); |
64 | - $token[] = new HTMLPurifier_Token_Text('%' . $bits[$i]); |
|
64 | + $token[] = new HTMLPurifier_Token_Text('%'.$bits[$i]); |
|
65 | 65 | $token[] = new HTMLPurifier_Token_End('a'); |
66 | 66 | } |
67 | 67 | } |
@@ -97,7 +97,7 @@ |
||
97 | 97 | break; |
98 | 98 | } |
99 | 99 | // This is safe because we removed the token that triggered this. |
100 | - $this->rewindOffset($b+$deleted); |
|
100 | + $this->rewindOffset($b + $deleted); |
|
101 | 101 | return; |
102 | 102 | } |
103 | 103 | } |
@@ -81,9 +81,13 @@ |
||
81 | 81 | if (isset($this->exclude[$token->name])) { |
82 | 82 | $r = true; |
83 | 83 | foreach ($this->exclude[$token->name] as $elem) { |
84 | - if (!isset($token->attr[$elem])) $r = false; |
|
84 | + if (!isset($token->attr[$elem])) { |
|
85 | + $r = false; |
|
86 | + } |
|
85 | 87 | } |
86 | - if ($r) return; |
|
88 | + if ($r) { |
|
89 | + return; |
|
90 | + } |
|
87 | 91 | } |
88 | 92 | if (isset($token->attr['id']) || isset($token->attr['name'])) { |
89 | 93 | return; |