@@ -37,7 +37,7 @@ |
||
37 | 37 | public function prependCSS(&$attr, $css) |
38 | 38 | { |
39 | 39 | $attr['style'] = isset($attr['style']) ? $attr['style'] : ''; |
40 | - $attr['style'] = $css . $attr['style']; |
|
40 | + $attr['style'] = $css.$attr['style']; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public function toArray($t = NULL) { |
48 | 48 | $a = $this->front; |
49 | 49 | if ($t !== NULL) $a[] = $t; |
50 | - for ($i = count($this->back)-1; $i >= 0; $i--) { |
|
50 | + for ($i = count($this->back) - 1; $i >= 0; $i--) { |
|
51 | 51 | $a[] = $this->back[$i]; |
52 | 52 | } |
53 | 53 | return $a; |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $r = $this->delete(); |
149 | 149 | } |
150 | 150 | // insert |
151 | - for ($i = count($replacement)-1; $i >= 0; $i--) { |
|
151 | + for ($i = count($replacement) - 1; $i >= 0; $i--) { |
|
152 | 152 | $this->insertAfter($r); |
153 | 153 | $r = $replacement[$i]; |
154 | 154 | } |
@@ -53,7 +53,7 @@ discard block |
||
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) |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | if (!isset($this->info[$type])) { |
79 | - trigger_error('Cannot retrieve undefined attribute type ' . $type, E_USER_ERROR); |
|
79 | + trigger_error('Cannot retrieve undefined attribute type '.$type, E_USER_ERROR); |
|
80 | 80 | return; |
81 | 81 | } |
82 | 82 | return $this->info[$type]->make($string); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | protected function errorInconsistent($class, $type) |
162 | 162 | { |
163 | 163 | throw new HTMLPurifier_Exception( |
164 | - "Inconsistency in $class: " . HTMLPurifier_VarParser::getTypeName($type) . |
|
164 | + "Inconsistency in $class: ".HTMLPurifier_VarParser::getTypeName($type). |
|
165 | 165 | " not implemented" |
166 | 166 | ); |
167 | 167 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | protected function errorGeneric($var, $type) |
175 | 175 | { |
176 | 176 | $vtype = gettype($var); |
177 | - $this->error("Expected type " . HTMLPurifier_VarParser::getTypeName($type) . ", got $vtype"); |
|
177 | + $this->error("Expected type ".HTMLPurifier_VarParser::getTypeName($type).", got $vtype"); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | /** |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | public function preFilter($html, $config, $context) |
18 | 18 | { |
19 | - $pre_regex = '#<object[^>]+>.+?' . |
|
19 | + $pre_regex = '#<object[^>]+>.+?'. |
|
20 | 20 | '(?:http:)?//www.youtube.com/((?:v|cp)/[A-Za-z0-9\-_=]+).+?</object>#s'; |
21 | 21 | $pre_replace = '<span class="youtube-embed">\1</span>'; |
22 | 22 | return preg_replace($pre_regex, $pre_replace, $html); |
@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | protected function postFilterCallback($matches) |
51 | 51 | { |
52 | 52 | $url = $this->armorUrl($matches[1]); |
53 | - return '<object width="425" height="350" type="application/x-shockwave-flash" ' . |
|
54 | - 'data="//www.youtube.com/' . $url . '">' . |
|
55 | - '<param name="movie" value="//www.youtube.com/' . $url . '"></param>' . |
|
56 | - '<!--[if IE]>' . |
|
57 | - '<embed src="//www.youtube.com/' . $url . '"' . |
|
58 | - 'type="application/x-shockwave-flash"' . |
|
59 | - 'wmode="transparent" width="425" height="350" />' . |
|
60 | - '<![endif]-->' . |
|
53 | + return '<object width="425" height="350" type="application/x-shockwave-flash" '. |
|
54 | + 'data="//www.youtube.com/'.$url.'">'. |
|
55 | + '<param name="movie" value="//www.youtube.com/'.$url.'"></param>'. |
|
56 | + '<!--[if IE]>'. |
|
57 | + '<embed src="//www.youtube.com/'.$url.'"'. |
|
58 | + 'type="application/x-shockwave-flash"'. |
|
59 | + 'wmode="transparent" width="425" height="350" />'. |
|
60 | + '<![endif]-->'. |
|
61 | 61 | '</object>'; |
62 | 62 | } |
63 | 63 | } |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | if ($x === ' ') { |
228 | 228 | $delim = ' '; |
229 | 229 | } else { |
230 | - $delim = ' ' . $x . ' '; |
|
230 | + $delim = ' '.$x.' '; |
|
231 | 231 | } |
232 | 232 | } else { |
233 | 233 | // simple selector |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | if ($nx === null) { |
269 | 269 | $nx = ''; |
270 | 270 | } |
271 | - $nx .= $sdelim . $y; |
|
271 | + $nx .= $sdelim.$y; |
|
272 | 272 | } |
273 | 273 | } |
274 | 274 | } |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | if ($nsel === null) { |
277 | 277 | $nsel = $nx; |
278 | 278 | } else { |
279 | - $nsel .= $delim . $nx; |
|
279 | + $nsel .= $delim.$nx; |
|
280 | 280 | } |
281 | 281 | } else { |
282 | 282 | // delimiters to the left of invalid |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | */ |
78 | 78 | protected function element($tag, $contents, $attr = array(), $escape = true) |
79 | 79 | { |
80 | - return $this->start($tag, $attr) . |
|
81 | - ($escape ? $this->escape($contents) : $contents) . |
|
80 | + return $this->start($tag, $attr). |
|
81 | + ($escape ? $this->escape($contents) : $contents). |
|
82 | 82 | $this->end($tag); |
83 | 83 | } |
84 | 84 | |
@@ -117,9 +117,9 @@ discard block |
||
117 | 117 | $value = $value ? 'On' : 'Off'; |
118 | 118 | } |
119 | 119 | return |
120 | - $this->start('tr') . "\n" . |
|
121 | - $this->element('th', $name) . "\n" . |
|
122 | - $this->element('td', $value) . "\n" . |
|
120 | + $this->start('tr')."\n". |
|
121 | + $this->element('th', $name)."\n". |
|
122 | + $this->element('td', $value)."\n". |
|
123 | 123 | $this->end('tr'); |
124 | 124 | } |
125 | 125 | |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | if ($five === null) { |
174 | 174 | $five = version_compare(PHP_VERSION, '5', '>='); |
175 | 175 | } |
176 | - $prefix = 'HTMLPurifier_' . $sec_prefix; |
|
176 | + $prefix = 'HTMLPurifier_'.$sec_prefix; |
|
177 | 177 | if (!$five) { |
178 | 178 | $prefix = strtolower($prefix); |
179 | 179 | } |
@@ -196,11 +196,11 @@ discard block |
||
196 | 196 | $class .= implode(', ', $values); |
197 | 197 | break; |
198 | 198 | case 'css_multiple': |
199 | - $class .= $this->getClass($obj->single, $sec_prefix) . ', '; |
|
199 | + $class .= $this->getClass($obj->single, $sec_prefix).', '; |
|
200 | 200 | $class .= $obj->max; |
201 | 201 | break; |
202 | 202 | case 'css_denyelementdecorator': |
203 | - $class .= $this->getClass($obj->def, $sec_prefix) . ', '; |
|
203 | + $class .= $this->getClass($obj->def, $sec_prefix).', '; |
|
204 | 204 | $class .= $obj->element; |
205 | 205 | break; |
206 | 206 | case 'css_importantdecorator': |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $this->context = $context; |
34 | 34 | $this->obj = $obj; |
35 | 35 | $this->member = $member; |
36 | - $this->contents =& $obj->$member; |
|
36 | + $this->contents = & $obj->$member; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | protected function error($msg) |
125 | 125 | { |
126 | - throw new HTMLPurifier_ConfigSchema_Exception(ucfirst($this->member) . ' in ' . $this->context . ' ' . $msg); |
|
126 | + throw new HTMLPurifier_ConfigSchema_Exception(ucfirst($this->member).' in '.$this->context.' '.$msg); |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 |
@@ -36,10 +36,10 @@ discard block |
||
36 | 36 | public function buildDir($interchange, $dir = null) |
37 | 37 | { |
38 | 38 | if (!$dir) { |
39 | - $dir = HTMLPURIFIER_PREFIX . '/HTMLPurifier/ConfigSchema/schema'; |
|
39 | + $dir = HTMLPURIFIER_PREFIX.'/HTMLPurifier/ConfigSchema/schema'; |
|
40 | 40 | } |
41 | - if (file_exists($dir . '/info.ini')) { |
|
42 | - $info = parse_ini_file($dir . '/info.ini'); |
|
41 | + if (file_exists($dir.'/info.ini')) { |
|
42 | + $info = parse_ini_file($dir.'/info.ini'); |
|
43 | 43 | $interchange->name = $info['name']; |
44 | 44 | } |
45 | 45 | |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | sort($files); |
57 | 57 | foreach ($files as $file) { |
58 | - $this->buildFile($interchange, $dir . '/' . $file); |
|
58 | + $this->buildFile($interchange, $dir.'/'.$file); |
|
59 | 59 | } |
60 | 60 | return $interchange; |
61 | 61 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $directive->typeAllowsNull |
131 | 131 | ); |
132 | 132 | } catch (HTMLPurifier_VarParserException $e) { |
133 | - throw new HTMLPurifier_ConfigSchema_Exception($e->getMessage() . " in DEFAULT in directive hash '$id'"); |
|
133 | + throw new HTMLPurifier_ConfigSchema_Exception($e->getMessage()." in DEFAULT in directive hash '$id'"); |
|
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | */ |
180 | 180 | protected function evalArray($contents) |
181 | 181 | { |
182 | - return eval('return array(' . $contents . ');'); |
|
182 | + return eval('return array('.$contents.');'); |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |