Completed
Push — master ( c524ca...754537 )
by Petrus
06:40
created
vendor/ezyang/htmlpurifier/library/HTMLPurifier/DoctypeRegistry.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -57,18 +57,18 @@  discard block
 block discarded – undo
57 57
                 $dtd_system
58 58
             );
59 59
         }
60
-        $this->doctypes[$doctype->name] = $doctype;
60
+        $this->doctypes[ $doctype->name ] = $doctype;
61 61
         $name = $doctype->name;
62 62
         // hookup aliases
63 63
         foreach ($doctype->aliases as $alias) {
64
-            if (isset($this->doctypes[$alias])) {
64
+            if (isset($this->doctypes[ $alias ])) {
65 65
                 continue;
66 66
             }
67
-            $this->aliases[$alias] = $name;
67
+            $this->aliases[ $alias ] = $name;
68 68
         }
69 69
         // remove old aliases
70
-        if (isset($this->aliases[$name])) {
71
-            unset($this->aliases[$name]);
70
+        if (isset($this->aliases[ $name ])) {
71
+            unset($this->aliases[ $name ]);
72 72
         }
73 73
         return $doctype;
74 74
     }
@@ -82,15 +82,15 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function get($doctype)
84 84
     {
85
-        if (isset($this->aliases[$doctype])) {
86
-            $doctype = $this->aliases[$doctype];
85
+        if (isset($this->aliases[ $doctype ])) {
86
+            $doctype = $this->aliases[ $doctype ];
87 87
         }
88
-        if (!isset($this->doctypes[$doctype])) {
89
-            trigger_error('Doctype ' . htmlspecialchars($doctype) . ' does not exist', E_USER_ERROR);
88
+        if (!isset($this->doctypes[ $doctype ])) {
89
+            trigger_error('Doctype '.htmlspecialchars($doctype).' does not exist', E_USER_ERROR);
90 90
             $anon = new HTMLPurifier_Doctype($doctype);
91 91
             return $anon;
92 92
         }
93
-        return $this->doctypes[$doctype];
93
+        return $this->doctypes[ $doctype ];
94 94
     }
95 95
 
96 96
     /**
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/TagTransform.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
      */
30 30
     protected function prependCSS(&$attr, $css)
31 31
     {
32
-        $attr['style'] = isset($attr['style']) ? $attr['style'] : '';
33
-        $attr['style'] = $css . $attr['style'];
32
+        $attr[ 'style' ] = isset($attr[ 'style' ]) ? $attr[ 'style' ] : '';
33
+        $attr[ 'style' ] = $css.$attr[ 'style' ];
34 34
     }
35 35
 }
36 36
 
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/CSSDefinition.php 1 patch
Spacing   +94 added lines, -95 removed lines patch added patch discarded remove patch
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
      */
22 22
     protected function doSetup($config)
23 23
     {
24
-        $this->info['text-align'] = new HTMLPurifier_AttrDef_Enum(
24
+        $this->info[ 'text-align' ] = new HTMLPurifier_AttrDef_Enum(
25 25
             array('left', 'right', 'center', 'justify'),
26 26
             false
27 27
         );
28 28
 
29 29
         $border_style =
30
-            $this->info['border-bottom-style'] =
31
-            $this->info['border-right-style'] =
32
-            $this->info['border-left-style'] =
33
-            $this->info['border-top-style'] = new HTMLPurifier_AttrDef_Enum(
30
+            $this->info[ 'border-bottom-style' ] =
31
+            $this->info[ 'border-right-style' ] =
32
+            $this->info[ 'border-left-style' ] =
33
+            $this->info[ 'border-top-style' ] = new HTMLPurifier_AttrDef_Enum(
34 34
                 array(
35 35
                     'none',
36 36
                     'hidden',
@@ -46,21 +46,21 @@  discard block
 block discarded – undo
46 46
                 false
47 47
             );
48 48
 
49
-        $this->info['border-style'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_style);
49
+        $this->info[ 'border-style' ] = new HTMLPurifier_AttrDef_CSS_Multiple($border_style);
50 50
 
51
-        $this->info['clear'] = new HTMLPurifier_AttrDef_Enum(
51
+        $this->info[ 'clear' ] = new HTMLPurifier_AttrDef_Enum(
52 52
             array('none', 'left', 'right', 'both'),
53 53
             false
54 54
         );
55
-        $this->info['float'] = new HTMLPurifier_AttrDef_Enum(
55
+        $this->info[ 'float' ] = new HTMLPurifier_AttrDef_Enum(
56 56
             array('none', 'left', 'right'),
57 57
             false
58 58
         );
59
-        $this->info['font-style'] = new HTMLPurifier_AttrDef_Enum(
59
+        $this->info[ 'font-style' ] = new HTMLPurifier_AttrDef_Enum(
60 60
             array('normal', 'italic', 'oblique'),
61 61
             false
62 62
         );
63
-        $this->info['font-variant'] = new HTMLPurifier_AttrDef_Enum(
63
+        $this->info[ 'font-variant' ] = new HTMLPurifier_AttrDef_Enum(
64 64
             array('normal', 'small-caps'),
65 65
             false
66 66
         );
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
             )
73 73
         );
74 74
 
75
-        $this->info['list-style-position'] = new HTMLPurifier_AttrDef_Enum(
75
+        $this->info[ 'list-style-position' ] = new HTMLPurifier_AttrDef_Enum(
76 76
             array('inside', 'outside'),
77 77
             false
78 78
         );
79
-        $this->info['list-style-type'] = new HTMLPurifier_AttrDef_Enum(
79
+        $this->info[ 'list-style-type' ] = new HTMLPurifier_AttrDef_Enum(
80 80
             array(
81 81
                 'disc',
82 82
                 'circle',
@@ -90,69 +90,69 @@  discard block
 block discarded – undo
90 90
             ),
91 91
             false
92 92
         );
93
-        $this->info['list-style-image'] = $uri_or_none;
93
+        $this->info[ 'list-style-image' ] = $uri_or_none;
94 94
 
95
-        $this->info['list-style'] = new HTMLPurifier_AttrDef_CSS_ListStyle($config);
95
+        $this->info[ 'list-style' ] = new HTMLPurifier_AttrDef_CSS_ListStyle($config);
96 96
 
97
-        $this->info['text-transform'] = new HTMLPurifier_AttrDef_Enum(
97
+        $this->info[ 'text-transform' ] = new HTMLPurifier_AttrDef_Enum(
98 98
             array('capitalize', 'uppercase', 'lowercase', 'none'),
99 99
             false
100 100
         );
101
-        $this->info['color'] = new HTMLPurifier_AttrDef_CSS_Color();
101
+        $this->info[ 'color' ] = new HTMLPurifier_AttrDef_CSS_Color();
102 102
 
103
-        $this->info['background-image'] = $uri_or_none;
104
-        $this->info['background-repeat'] = new HTMLPurifier_AttrDef_Enum(
103
+        $this->info[ 'background-image' ] = $uri_or_none;
104
+        $this->info[ 'background-repeat' ] = new HTMLPurifier_AttrDef_Enum(
105 105
             array('repeat', 'repeat-x', 'repeat-y', 'no-repeat')
106 106
         );
107
-        $this->info['background-attachment'] = new HTMLPurifier_AttrDef_Enum(
107
+        $this->info[ 'background-attachment' ] = new HTMLPurifier_AttrDef_Enum(
108 108
             array('scroll', 'fixed')
109 109
         );
110
-        $this->info['background-position'] = new HTMLPurifier_AttrDef_CSS_BackgroundPosition();
110
+        $this->info[ 'background-position' ] = new HTMLPurifier_AttrDef_CSS_BackgroundPosition();
111 111
 
112 112
         $border_color =
113
-            $this->info['border-top-color'] =
114
-            $this->info['border-bottom-color'] =
115
-            $this->info['border-left-color'] =
116
-            $this->info['border-right-color'] =
117
-            $this->info['background-color'] = new HTMLPurifier_AttrDef_CSS_Composite(
113
+            $this->info[ 'border-top-color' ] =
114
+            $this->info[ 'border-bottom-color' ] =
115
+            $this->info[ 'border-left-color' ] =
116
+            $this->info[ 'border-right-color' ] =
117
+            $this->info[ 'background-color' ] = new HTMLPurifier_AttrDef_CSS_Composite(
118 118
                 array(
119 119
                     new HTMLPurifier_AttrDef_Enum(array('transparent')),
120 120
                     new HTMLPurifier_AttrDef_CSS_Color()
121 121
                 )
122 122
             );
123 123
 
124
-        $this->info['background'] = new HTMLPurifier_AttrDef_CSS_Background($config);
124
+        $this->info[ 'background' ] = new HTMLPurifier_AttrDef_CSS_Background($config);
125 125
 
126
-        $this->info['border-color'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_color);
126
+        $this->info[ 'border-color' ] = new HTMLPurifier_AttrDef_CSS_Multiple($border_color);
127 127
 
128 128
         $border_width =
129
-            $this->info['border-top-width'] =
130
-            $this->info['border-bottom-width'] =
131
-            $this->info['border-left-width'] =
132
-            $this->info['border-right-width'] = new HTMLPurifier_AttrDef_CSS_Composite(
129
+            $this->info[ 'border-top-width' ] =
130
+            $this->info[ 'border-bottom-width' ] =
131
+            $this->info[ 'border-left-width' ] =
132
+            $this->info[ 'border-right-width' ] = new HTMLPurifier_AttrDef_CSS_Composite(
133 133
                 array(
134 134
                     new HTMLPurifier_AttrDef_Enum(array('thin', 'medium', 'thick')),
135 135
                     new HTMLPurifier_AttrDef_CSS_Length('0') //disallow negative
136 136
                 )
137 137
             );
138 138
 
139
-        $this->info['border-width'] = new HTMLPurifier_AttrDef_CSS_Multiple($border_width);
139
+        $this->info[ 'border-width' ] = new HTMLPurifier_AttrDef_CSS_Multiple($border_width);
140 140
 
141
-        $this->info['letter-spacing'] = new HTMLPurifier_AttrDef_CSS_Composite(
141
+        $this->info[ 'letter-spacing' ] = new HTMLPurifier_AttrDef_CSS_Composite(
142 142
             array(
143 143
                 new HTMLPurifier_AttrDef_Enum(array('normal')),
144 144
                 new HTMLPurifier_AttrDef_CSS_Length()
145 145
             )
146 146
         );
147 147
 
148
-        $this->info['word-spacing'] = new HTMLPurifier_AttrDef_CSS_Composite(
148
+        $this->info[ 'word-spacing' ] = new HTMLPurifier_AttrDef_CSS_Composite(
149 149
             array(
150 150
                 new HTMLPurifier_AttrDef_Enum(array('normal')),
151 151
                 new HTMLPurifier_AttrDef_CSS_Length()
152 152
             )
153 153
         );
154 154
 
155
-        $this->info['font-size'] = new HTMLPurifier_AttrDef_CSS_Composite(
155
+        $this->info[ 'font-size' ] = new HTMLPurifier_AttrDef_CSS_Composite(
156 156
             array(
157 157
                 new HTMLPurifier_AttrDef_Enum(
158 158
                     array(
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             )
173 173
         );
174 174
 
175
-        $this->info['line-height'] = new HTMLPurifier_AttrDef_CSS_Composite(
175
+        $this->info[ 'line-height' ] = new HTMLPurifier_AttrDef_CSS_Composite(
176 176
             array(
177 177
                 new HTMLPurifier_AttrDef_Enum(array('normal')),
178 178
                 new HTMLPurifier_AttrDef_CSS_Number(true), // no negatives
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
         );
183 183
 
184 184
         $margin =
185
-            $this->info['margin-top'] =
186
-            $this->info['margin-bottom'] =
187
-            $this->info['margin-left'] =
188
-            $this->info['margin-right'] = new HTMLPurifier_AttrDef_CSS_Composite(
185
+            $this->info[ 'margin-top' ] =
186
+            $this->info[ 'margin-bottom' ] =
187
+            $this->info[ 'margin-left' ] =
188
+            $this->info[ 'margin-right' ] = new HTMLPurifier_AttrDef_CSS_Composite(
189 189
                 array(
190 190
                     new HTMLPurifier_AttrDef_CSS_Length(),
191 191
                     new HTMLPurifier_AttrDef_CSS_Percentage(),
@@ -193,23 +193,23 @@  discard block
 block discarded – undo
193 193
                 )
194 194
             );
195 195
 
196
-        $this->info['margin'] = new HTMLPurifier_AttrDef_CSS_Multiple($margin);
196
+        $this->info[ 'margin' ] = new HTMLPurifier_AttrDef_CSS_Multiple($margin);
197 197
 
198 198
         // non-negative
199 199
         $padding =
200
-            $this->info['padding-top'] =
201
-            $this->info['padding-bottom'] =
202
-            $this->info['padding-left'] =
203
-            $this->info['padding-right'] = new HTMLPurifier_AttrDef_CSS_Composite(
200
+            $this->info[ 'padding-top' ] =
201
+            $this->info[ 'padding-bottom' ] =
202
+            $this->info[ 'padding-left' ] =
203
+            $this->info[ 'padding-right' ] = new HTMLPurifier_AttrDef_CSS_Composite(
204 204
                 array(
205 205
                     new HTMLPurifier_AttrDef_CSS_Length('0'),
206 206
                     new HTMLPurifier_AttrDef_CSS_Percentage(true)
207 207
                 )
208 208
             );
209 209
 
210
-        $this->info['padding'] = new HTMLPurifier_AttrDef_CSS_Multiple($padding);
210
+        $this->info[ 'padding' ] = new HTMLPurifier_AttrDef_CSS_Multiple($padding);
211 211
 
212
-        $this->info['text-indent'] = new HTMLPurifier_AttrDef_CSS_Composite(
212
+        $this->info[ 'text-indent' ] = new HTMLPurifier_AttrDef_CSS_Composite(
213 213
             array(
214 214
                 new HTMLPurifier_AttrDef_CSS_Length(),
215 215
                 new HTMLPurifier_AttrDef_CSS_Percentage()
@@ -225,11 +225,10 @@  discard block
 block discarded – undo
225 225
         );
226 226
         $max = $config->get('CSS.MaxImgLength');
227 227
 
228
-        $this->info['width'] =
229
-        $this->info['height'] =
228
+        $this->info[ 'width' ] =
229
+        $this->info[ 'height' ] =
230 230
             $max === null ?
231
-                $trusted_wh :
232
-                new HTMLPurifier_AttrDef_Switch(
231
+                $trusted_wh : new HTMLPurifier_AttrDef_Switch(
233 232
                     'img',
234 233
                     // For img tags:
235 234
                     new HTMLPurifier_AttrDef_CSS_Composite(
@@ -242,12 +241,12 @@  discard block
 block discarded – undo
242 241
                     $trusted_wh
243 242
                 );
244 243
 
245
-        $this->info['text-decoration'] = new HTMLPurifier_AttrDef_CSS_TextDecoration();
244
+        $this->info[ 'text-decoration' ] = new HTMLPurifier_AttrDef_CSS_TextDecoration();
246 245
 
247
-        $this->info['font-family'] = new HTMLPurifier_AttrDef_CSS_FontFamily();
246
+        $this->info[ 'font-family' ] = new HTMLPurifier_AttrDef_CSS_FontFamily();
248 247
 
249 248
         // this could use specialized code
250
-        $this->info['font-weight'] = new HTMLPurifier_AttrDef_Enum(
249
+        $this->info[ 'font-weight' ] = new HTMLPurifier_AttrDef_Enum(
251 250
             array(
252 251
                 'normal',
253 252
                 'bold',
@@ -268,28 +267,28 @@  discard block
 block discarded – undo
268 267
 
269 268
         // MUST be called after other font properties, as it references
270 269
         // a CSSDefinition object
271
-        $this->info['font'] = new HTMLPurifier_AttrDef_CSS_Font($config);
270
+        $this->info[ 'font' ] = new HTMLPurifier_AttrDef_CSS_Font($config);
272 271
 
273 272
         // same here
274
-        $this->info['border'] =
275
-        $this->info['border-bottom'] =
276
-        $this->info['border-top'] =
277
-        $this->info['border-left'] =
278
-        $this->info['border-right'] = new HTMLPurifier_AttrDef_CSS_Border($config);
273
+        $this->info[ 'border' ] =
274
+        $this->info[ 'border-bottom' ] =
275
+        $this->info[ 'border-top' ] =
276
+        $this->info[ 'border-left' ] =
277
+        $this->info[ 'border-right' ] = new HTMLPurifier_AttrDef_CSS_Border($config);
279 278
 
280
-        $this->info['border-collapse'] = new HTMLPurifier_AttrDef_Enum(
279
+        $this->info[ 'border-collapse' ] = new HTMLPurifier_AttrDef_Enum(
281 280
             array('collapse', 'separate')
282 281
         );
283 282
 
284
-        $this->info['caption-side'] = new HTMLPurifier_AttrDef_Enum(
283
+        $this->info[ 'caption-side' ] = new HTMLPurifier_AttrDef_Enum(
285 284
             array('top', 'bottom')
286 285
         );
287 286
 
288
-        $this->info['table-layout'] = new HTMLPurifier_AttrDef_Enum(
287
+        $this->info[ 'table-layout' ] = new HTMLPurifier_AttrDef_Enum(
289 288
             array('auto', 'fixed')
290 289
         );
291 290
 
292
-        $this->info['vertical-align'] = new HTMLPurifier_AttrDef_CSS_Composite(
291
+        $this->info[ 'vertical-align' ] = new HTMLPurifier_AttrDef_CSS_Composite(
293 292
             array(
294 293
                 new HTMLPurifier_AttrDef_Enum(
295 294
                     array(
@@ -308,11 +307,11 @@  discard block
 block discarded – undo
308 307
             )
309 308
         );
310 309
 
311
-        $this->info['border-spacing'] = new HTMLPurifier_AttrDef_CSS_Multiple(new HTMLPurifier_AttrDef_CSS_Length(), 2);
310
+        $this->info[ 'border-spacing' ] = new HTMLPurifier_AttrDef_CSS_Multiple(new HTMLPurifier_AttrDef_CSS_Length(), 2);
312 311
 
313 312
         // These CSS properties don't work on many browsers, but we live
314 313
         // in THE FUTURE!
315
-        $this->info['white-space'] = new HTMLPurifier_AttrDef_Enum(
314
+        $this->info[ 'white-space' ] = new HTMLPurifier_AttrDef_Enum(
316 315
             array('nowrap', 'normal', 'pre', 'pre-wrap', 'pre-line')
317 316
         );
318 317
 
@@ -331,7 +330,7 @@  discard block
 block discarded – undo
331 330
         $allow_important = $config->get('CSS.AllowImportant');
332 331
         // wrap all attr-defs with decorator that handles !important
333 332
         foreach ($this->info as $k => $v) {
334
-            $this->info[$k] = new HTMLPurifier_AttrDef_CSS_ImportantDecorator($v, $allow_important);
333
+            $this->info[ $k ] = new HTMLPurifier_AttrDef_CSS_ImportantDecorator($v, $allow_important);
335 334
         }
336 335
 
337 336
         $this->setupConfigStuff($config);
@@ -343,23 +342,23 @@  discard block
 block discarded – undo
343 342
     protected function doSetupProprietary($config)
344 343
     {
345 344
         // Internet Explorer only scrollbar colors
346
-        $this->info['scrollbar-arrow-color'] = new HTMLPurifier_AttrDef_CSS_Color();
347
-        $this->info['scrollbar-base-color'] = new HTMLPurifier_AttrDef_CSS_Color();
348
-        $this->info['scrollbar-darkshadow-color'] = new HTMLPurifier_AttrDef_CSS_Color();
349
-        $this->info['scrollbar-face-color'] = new HTMLPurifier_AttrDef_CSS_Color();
350
-        $this->info['scrollbar-highlight-color'] = new HTMLPurifier_AttrDef_CSS_Color();
351
-        $this->info['scrollbar-shadow-color'] = new HTMLPurifier_AttrDef_CSS_Color();
345
+        $this->info[ 'scrollbar-arrow-color' ] = new HTMLPurifier_AttrDef_CSS_Color();
346
+        $this->info[ 'scrollbar-base-color' ] = new HTMLPurifier_AttrDef_CSS_Color();
347
+        $this->info[ 'scrollbar-darkshadow-color' ] = new HTMLPurifier_AttrDef_CSS_Color();
348
+        $this->info[ 'scrollbar-face-color' ] = new HTMLPurifier_AttrDef_CSS_Color();
349
+        $this->info[ 'scrollbar-highlight-color' ] = new HTMLPurifier_AttrDef_CSS_Color();
350
+        $this->info[ 'scrollbar-shadow-color' ] = new HTMLPurifier_AttrDef_CSS_Color();
352 351
 
353 352
         // vendor specific prefixes of opacity
354
-        $this->info['-moz-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue();
355
-        $this->info['-khtml-opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue();
353
+        $this->info[ '-moz-opacity' ] = new HTMLPurifier_AttrDef_CSS_AlphaValue();
354
+        $this->info[ '-khtml-opacity' ] = new HTMLPurifier_AttrDef_CSS_AlphaValue();
356 355
 
357 356
         // only opacity, for now
358
-        $this->info['filter'] = new HTMLPurifier_AttrDef_CSS_Filter();
357
+        $this->info[ 'filter' ] = new HTMLPurifier_AttrDef_CSS_Filter();
359 358
 
360 359
         // more CSS3
361
-        $this->info['page-break-after'] =
362
-        $this->info['page-break-before'] = new HTMLPurifier_AttrDef_Enum(
360
+        $this->info[ 'page-break-after' ] =
361
+        $this->info[ 'page-break-before' ] = new HTMLPurifier_AttrDef_Enum(
363 362
             array(
364 363
                 'auto',
365 364
                 'always',
@@ -368,7 +367,7 @@  discard block
 block discarded – undo
368 367
                 'right'
369 368
             )
370 369
         );
371
-        $this->info['page-break-inside'] = new HTMLPurifier_AttrDef_Enum(array('auto', 'avoid'));
370
+        $this->info[ 'page-break-inside' ] = new HTMLPurifier_AttrDef_Enum(array('auto', 'avoid'));
372 371
 
373 372
     }
374 373
 
@@ -377,7 +376,7 @@  discard block
 block discarded – undo
377 376
      */
378 377
     protected function doSetupTricky($config)
379 378
     {
380
-        $this->info['display'] = new HTMLPurifier_AttrDef_Enum(
379
+        $this->info[ 'display' ] = new HTMLPurifier_AttrDef_Enum(
381 380
             array(
382 381
                 'inline',
383 382
                 'block',
@@ -399,11 +398,11 @@  discard block
 block discarded – undo
399 398
                 'none'
400 399
             )
401 400
         );
402
-        $this->info['visibility'] = new HTMLPurifier_AttrDef_Enum(
401
+        $this->info[ 'visibility' ] = new HTMLPurifier_AttrDef_Enum(
403 402
             array('visible', 'hidden', 'collapse')
404 403
         );
405
-        $this->info['overflow'] = new HTMLPurifier_AttrDef_Enum(array('visible', 'hidden', 'auto', 'scroll'));
406
-        $this->info['opacity'] = new HTMLPurifier_AttrDef_CSS_AlphaValue();
404
+        $this->info[ 'overflow' ] = new HTMLPurifier_AttrDef_Enum(array('visible', 'hidden', 'auto', 'scroll'));
405
+        $this->info[ 'opacity' ] = new HTMLPurifier_AttrDef_CSS_AlphaValue();
407 406
     }
408 407
 
409 408
     /**
@@ -411,20 +410,20 @@  discard block
 block discarded – undo
411 410
      */
412 411
     protected function doSetupTrusted($config)
413 412
     {
414
-        $this->info['position'] = new HTMLPurifier_AttrDef_Enum(
413
+        $this->info[ 'position' ] = new HTMLPurifier_AttrDef_Enum(
415 414
             array('static', 'relative', 'absolute', 'fixed')
416 415
         );
417
-        $this->info['top'] =
418
-        $this->info['left'] =
419
-        $this->info['right'] =
420
-        $this->info['bottom'] = new HTMLPurifier_AttrDef_CSS_Composite(
416
+        $this->info[ 'top' ] =
417
+        $this->info[ 'left' ] =
418
+        $this->info[ 'right' ] =
419
+        $this->info[ 'bottom' ] = new HTMLPurifier_AttrDef_CSS_Composite(
421 420
             array(
422 421
                 new HTMLPurifier_AttrDef_CSS_Length(),
423 422
                 new HTMLPurifier_AttrDef_CSS_Percentage(),
424 423
                 new HTMLPurifier_AttrDef_Enum(array('auto')),
425 424
             )
426 425
         );
427
-        $this->info['z-index'] = new HTMLPurifier_AttrDef_CSS_Composite(
426
+        $this->info[ 'z-index' ] = new HTMLPurifier_AttrDef_CSS_Composite(
428 427
             array(
429 428
                 new HTMLPurifier_AttrDef_Integer(),
430 429
                 new HTMLPurifier_AttrDef_Enum(array('auto')),
@@ -442,15 +441,15 @@  discard block
 block discarded – undo
442 441
     protected function setupConfigStuff($config)
443 442
     {
444 443
         // setup allowed elements
445
-        $support = "(for information on implementing this, see the " .
444
+        $support = "(for information on implementing this, see the ".
446 445
             "support forums) ";
447 446
         $allowed_properties = $config->get('CSS.AllowedProperties');
448 447
         if ($allowed_properties !== null) {
449 448
             foreach ($this->info as $name => $d) {
450
-                if (!isset($allowed_properties[$name])) {
451
-                    unset($this->info[$name]);
449
+                if (!isset($allowed_properties[ $name ])) {
450
+                    unset($this->info[ $name ]);
452 451
                 }
453
-                unset($allowed_properties[$name]);
452
+                unset($allowed_properties[ $name ]);
454 453
             }
455 454
             // emit errors
456 455
             foreach ($allowed_properties as $name => $d) {
@@ -463,8 +462,8 @@  discard block
 block discarded – undo
463 462
         $forbidden_properties = $config->get('CSS.ForbiddenProperties');
464 463
         if ($forbidden_properties !== null) {
465 464
             foreach ($this->info as $name => $d) {
466
-                if (isset($forbidden_properties[$name])) {
467
-                    unset($this->info[$name]);
465
+                if (isset($forbidden_properties[ $name ])) {
466
+                    unset($this->info[ $name ]);
468 467
                 }
469 468
             }
470 469
         }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/StringHashParser.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             return false;
69 69
         }
70 70
         while (!feof($fh)) {
71
-            $ret[] = $this->parseHandle($fh);
71
+            $ret[ ] = $this->parseHandle($fh);
72 72
         }
73 73
         fclose($fh);
74 74
         return $ret;
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
             } elseif (strncmp('--', $line, 2) === 0) {
107 107
                 // Multiline declaration
108 108
                 $state = trim($line, '- ');
109
-                if (!isset($ret[$state])) {
110
-                    $ret[$state] = '';
109
+                if (!isset($ret[ $state ])) {
110
+                    $ret[ $state ] = '';
111 111
                 }
112 112
                 continue;
113 113
             } elseif (!$state) {
@@ -118,15 +118,15 @@  discard block
 block discarded – undo
118 118
                     $line = trim($line);
119 119
                 } else {
120 120
                     // Use default declaration
121
-                    $state  = $this->default;
121
+                    $state = $this->default;
122 122
                 }
123 123
             }
124 124
             if ($single) {
125
-                $ret[$state] = $line;
125
+                $ret[ $state ] = $line;
126 126
                 $single = false;
127 127
                 $state  = false;
128 128
             } else {
129
-                $ret[$state] .= "$line\n";
129
+                $ret[ $state ] .= "$line\n";
130 130
             }
131 131
         } while (!feof($fh));
132 132
         return $ret;
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/Printer/HTMLDefinition.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     public function render($config)
16 16
     {
17 17
         $ret = '';
18
-        $this->config =& $config;
18
+        $this->config = & $config;
19 19
 
20 20
         $this->def = $config->getHTMLDefinition();
21 21
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $list = array();
78 78
         foreach ($def->info_tag_transform as $old => $new) {
79 79
             $new = $this->getClass($new, 'TagTransform_');
80
-            $list[] = "<$old> with $new";
80
+            $list[ ] = "<$old> with $new";
81 81
         }
82 82
         $ret .= $this->element('td', $this->listify($list));
83 83
         $ret .= $this->end('tr');
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             $elements = $def->elements;
196 196
         }
197 197
         if ($def->type == 'chameleon') {
198
-            $attr['rowspan'] = 2;
198
+            $attr[ 'rowspan' ] = 2;
199 199
         } elseif ($def->type == 'empty') {
200 200
             $elements = array();
201 201
         } elseif ($def->type == 'table') {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 
218 218
             $ret .= $this->element(
219 219
                 'td',
220
-                '<em>Block</em>: ' .
220
+                '<em>Block</em>: '.
221 221
                 $this->escape($this->listifyTagLookup($def->block->elements)),
222 222
                 null,
223 223
                 0
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             $ret .= $this->start('tr');
227 227
             $ret .= $this->element(
228 228
                 'td',
229
-                '<em>Inline</em>: ' .
229
+                '<em>Inline</em>: '.
230 230
                 $this->escape($this->listifyTagLookup($def->inline->elements)),
231 231
                 null,
232 232
                 0
@@ -236,14 +236,14 @@  discard block
 block discarded – undo
236 236
 
237 237
             $ret .= $this->element(
238 238
                 'td',
239
-                '<em>' . ucfirst($def->type) . '</em>: ' .
239
+                '<em>'.ucfirst($def->type).'</em>: '.
240 240
                 $def->dtd_regex
241 241
             );
242 242
 
243 243
         } else {
244 244
             $ret .= $this->element(
245 245
                 'td',
246
-                '<em>' . ucfirst($def->type) . '</em>: ' .
246
+                '<em>'.ucfirst($def->type).'</em>: '.
247 247
                 $this->escape($this->listifyTagLookup($elements)),
248 248
                 null,
249 249
                 0
@@ -263,10 +263,10 @@  discard block
 block discarded – undo
263 263
         ksort($array);
264 264
         $list = array();
265 265
         foreach ($array as $name => $discard) {
266
-            if ($name !== '#PCDATA' && !isset($this->def->info[$name])) {
266
+            if ($name !== '#PCDATA' && !isset($this->def->info[ $name ])) {
267 267
                 continue;
268 268
             }
269
-            $list[] = $name;
269
+            $list[ ] = $name;
270 270
         }
271 271
         return $this->listify($list);
272 272
     }
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         ksort($array);
283 283
         $list = array();
284 284
         foreach ($array as $obj) {
285
-            $list[] = $this->getClass($obj, 'AttrTransform_');
285
+            $list[ ] = $this->getClass($obj, 'AttrTransform_');
286 286
         }
287 287
         return $this->listify($list);
288 288
     }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
             if ($obj === false) {
301 301
                 continue;
302 302
             }
303
-            $list[] = "$name&nbsp;=&nbsp;<i>" . $this->getClass($obj, 'AttrDef_') . '</i>';
303
+            $list[ ] = "$name&nbsp;=&nbsp;<i>".$this->getClass($obj, 'AttrDef_').'</i>';
304 304
         }
305 305
         return $this->listify($list);
306 306
     }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityParser.php 1 patch
Spacing   +16 added lines, -18 removed lines patch added patch discarded remove patch
@@ -79,25 +79,25 @@  discard block
 block discarded – undo
79 79
     protected function nonSpecialEntityCallback($matches)
80 80
     {
81 81
         // replaces all but big five
82
-        $entity = $matches[0];
83
-        $is_num = (@$matches[0][1] === '#');
82
+        $entity = $matches[ 0 ];
83
+        $is_num = (@$matches[ 0 ][ 1 ] === '#');
84 84
         if ($is_num) {
85
-            $is_hex = (@$entity[2] === 'x');
86
-            $code = $is_hex ? hexdec($matches[1]) : (int) $matches[2];
85
+            $is_hex = (@$entity[ 2 ] === 'x');
86
+            $code = $is_hex ? hexdec($matches[ 1 ]) : (int) $matches[ 2 ];
87 87
             // abort for special characters
88
-            if (isset($this->_special_dec2str[$code])) {
88
+            if (isset($this->_special_dec2str[ $code ])) {
89 89
                 return $entity;
90 90
             }
91 91
             return HTMLPurifier_Encoder::unichr($code);
92 92
         } else {
93
-            if (isset($this->_special_ent2dec[$matches[3]])) {
93
+            if (isset($this->_special_ent2dec[ $matches[ 3 ] ])) {
94 94
                 return $entity;
95 95
             }
96 96
             if (!$this->_entity_lookup) {
97 97
                 $this->_entity_lookup = HTMLPurifier_EntityLookup::instance();
98 98
             }
99
-            if (isset($this->_entity_lookup->table[$matches[3]])) {
100
-                return $this->_entity_lookup->table[$matches[3]];
99
+            if (isset($this->_entity_lookup->table[ $matches[ 3 ] ])) {
100
+                return $this->_entity_lookup->table[ $matches[ 3 ] ];
101 101
             } else {
102 102
                 return $entity;
103 103
             }
@@ -134,18 +134,16 @@  discard block
 block discarded – undo
134 134
      */
135 135
     protected function specialEntityCallback($matches)
136 136
     {
137
-        $entity = $matches[0];
138
-        $is_num = (@$matches[0][1] === '#');
137
+        $entity = $matches[ 0 ];
138
+        $is_num = (@$matches[ 0 ][ 1 ] === '#');
139 139
         if ($is_num) {
140
-            $is_hex = (@$entity[2] === 'x');
141
-            $int = $is_hex ? hexdec($matches[1]) : (int) $matches[2];
142
-            return isset($this->_special_dec2str[$int]) ?
143
-                $this->_special_dec2str[$int] :
144
-                $entity;
140
+            $is_hex = (@$entity[ 2 ] === 'x');
141
+            $int = $is_hex ? hexdec($matches[ 1 ]) : (int) $matches[ 2 ];
142
+            return isset($this->_special_dec2str[ $int ]) ?
143
+                $this->_special_dec2str[ $int ] : $entity;
145 144
         } else {
146
-            return isset($this->_special_ent2dec[$matches[3]]) ?
147
-                $this->_special_ent2dec[$matches[3]] :
148
-                $entity;
145
+            return isset($this->_special_ent2dec[ $matches[ 3 ] ]) ?
146
+                $this->_special_ent2dec[ $matches[ 3 ] ] : $entity;
149 147
         }
150 148
     }
151 149
 }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/Language.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         $factory = HTMLPurifier_LanguageFactory::instance();
79 79
         $factory->loadLanguage($this->code);
80 80
         foreach ($factory->keys as $key) {
81
-            $this->$key = $factory->cache[$this->code][$key];
81
+            $this->$key = $factory->cache[ $this->code ][ $key ];
82 82
         }
83 83
         $this->_loaded = true;
84 84
     }
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
         if (!$this->_loaded) {
94 94
             $this->load();
95 95
         }
96
-        if (!isset($this->messages[$key])) {
96
+        if (!isset($this->messages[ $key ])) {
97 97
             return "[$key]";
98 98
         }
99
-        return $this->messages[$key];
99
+        return $this->messages[ $key ];
100 100
     }
101 101
 
102 102
     /**
@@ -109,10 +109,10 @@  discard block
 block discarded – undo
109 109
         if (!$this->_loaded) {
110 110
             $this->load();
111 111
         }
112
-        if (!isset($this->errorNames[$int])) {
112
+        if (!isset($this->errorNames[ $int ])) {
113 113
             return "[Error: $int]";
114 114
         }
115
-        return $this->errorNames[$int];
115
+        return $this->errorNames[ $int ];
116 116
     }
117 117
 
118 118
     /**
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
             } else {
133 133
                 $ret .= $sep_last;
134 134
             }
135
-            $ret .= $array[$i];
135
+            $ret .= $array[ $i ];
136 136
         }
137 137
         return $ret;
138 138
     }
@@ -150,10 +150,10 @@  discard block
 block discarded – undo
150 150
         if (!$this->_loaded) {
151 151
             $this->load();
152 152
         }
153
-        if (!isset($this->messages[$key])) {
153
+        if (!isset($this->messages[ $key ])) {
154 154
             return "[$key]";
155 155
         }
156
-        $raw = $this->messages[$key];
156
+        $raw = $this->messages[ $key ];
157 157
         $subst = array();
158 158
         $generator = false;
159 159
         foreach ($args as $i => $value) {
@@ -164,38 +164,38 @@  discard block
 block discarded – undo
164 164
                         $generator = $this->context->get('Generator');
165 165
                     }
166 166
                     if (isset($value->name)) {
167
-                        $subst['$'.$i.'.Name'] = $value->name;
167
+                        $subst[ '$'.$i.'.Name' ] = $value->name;
168 168
                     }
169 169
                     if (isset($value->data)) {
170
-                        $subst['$'.$i.'.Data'] = $value->data;
170
+                        $subst[ '$'.$i.'.Data' ] = $value->data;
171 171
                     }
172
-                    $subst['$'.$i.'.Compact'] =
173
-                    $subst['$'.$i.'.Serialized'] = $generator->generateFromToken($value);
172
+                    $subst[ '$'.$i.'.Compact' ] =
173
+                    $subst[ '$'.$i.'.Serialized' ] = $generator->generateFromToken($value);
174 174
                     // a more complex algorithm for compact representation
175 175
                     // could be introduced for all types of tokens. This
176 176
                     // may need to be factored out into a dedicated class
177 177
                     if (!empty($value->attr)) {
178 178
                         $stripped_token = clone $value;
179 179
                         $stripped_token->attr = array();
180
-                        $subst['$'.$i.'.Compact'] = $generator->generateFromToken($stripped_token);
180
+                        $subst[ '$'.$i.'.Compact' ] = $generator->generateFromToken($stripped_token);
181 181
                     }
182
-                    $subst['$'.$i.'.Line'] = $value->line ? $value->line : 'unknown';
182
+                    $subst[ '$'.$i.'.Line' ] = $value->line ? $value->line : 'unknown';
183 183
                 }
184 184
                 continue;
185 185
             } elseif (is_array($value)) {
186 186
                 $keys = array_keys($value);
187 187
                 if (array_keys($keys) === $keys) {
188 188
                     // list
189
-                    $subst['$'.$i] = $this->listify($value);
189
+                    $subst[ '$'.$i ] = $this->listify($value);
190 190
                 } else {
191 191
                     // associative array
192 192
                     // no $i implementation yet, sorry
193
-                    $subst['$'.$i.'.Keys'] = $this->listify($keys);
194
-                    $subst['$'.$i.'.Values'] = $this->listify(array_values($value));
193
+                    $subst[ '$'.$i.'.Keys' ] = $this->listify($keys);
194
+                    $subst[ '$'.$i.'.Values' ] = $this->listify(array_values($value));
195 195
                 }
196 196
                 continue;
197 197
             }
198
-            $subst['$' . $i] = $value;
198
+            $subst[ '$'.$i ] = $value;
199 199
         }
200 200
         return strtr($raw, $subst);
201 201
     }
Please login to merge, or discard this patch.
ezyang/htmlpurifier/library/HTMLPurifier/Strategy/ValidateAttributes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
             }
31 31
 
32 32
             // skip tokens that are armored
33
-            if (!empty($token->armor['ValidateAttributes'])) {
33
+            if (!empty($token->armor[ 'ValidateAttributes' ])) {
34 34
                 continue;
35 35
             }
36 36
 
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/FixNesting.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,9 +103,9 @@
 block discarded – undo
103 103
         $parent_def = $definition->info_parent_def;
104 104
         $stack = array(
105 105
             array($top_node,
106
-                  $parent_def->descendants_are_inline,
107
-                  $parent_def->excludes, // exclusions
108
-                  0)
106
+                    $parent_def->descendants_are_inline,
107
+                    $parent_def->excludes, // exclusions
108
+                    0)
109 109
             );
110 110
 
111 111
         while (!empty($stack)) {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $context->register('IsInline', $is_inline);
62 62
 
63 63
         // setup error collector
64
-        $e =& $context->get('ErrorCollector', true);
64
+        $e = & $context->get('ErrorCollector', true);
65 65
 
66 66
         //####################################################################//
67 67
         // Loop initialization
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
             list($node, $is_inline, $excludes, $ix) = array_pop($stack);
113 113
             // recursive call
114 114
             $go = false;
115
-            $def = empty($stack) ? $definition->info_parent_def : $definition->info[$node->name];
116
-            while (isset($node->children[$ix])) {
117
-                $child = $node->children[$ix++];
115
+            $def = empty($stack) ? $definition->info_parent_def : $definition->info[ $node->name ];
116
+            while (isset($node->children[ $ix ])) {
117
+                $child = $node->children[ $ix++ ];
118 118
                 if ($child instanceof HTMLPurifier_Node_Element) {
119 119
                     $go = true;
120
-                    $stack[] = array($node, $is_inline, $excludes, $ix);
121
-                    $stack[] = array($child,
120
+                    $stack[ ] = array($node, $is_inline, $excludes, $ix);
121
+                    $stack[ ] = array($child,
122 122
                         // ToDo: I don't think it matters if it's def or
123 123
                         // child_def, but double check this...
124 124
                         $is_inline || $def->descendants_are_inline,
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
             if ($go) continue;
132 132
             list($token, $d) = $node->toTokenPair();
133 133
             // base case
134
-            if ($excludes_enabled && isset($excludes[$node->name])) {
134
+            if ($excludes_enabled && isset($excludes[ $node->name ])) {
135 135
                 $node->dead = true;
136 136
                 if ($e) $e->send(E_ERROR, 'Strategy_FixNesting: Node excluded');
137 137
             } else {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                 // strategies handle it
141 141
                 $children = array();
142 142
                 foreach ($node->children as $child) {
143
-                    if (!$child->dead) $children[] = $child;
143
+                    if (!$child->dead) $children[ ] = $child;
144 144
                 }
145 145
                 $result = $def->child->validateChildren($children, $config, $context);
146 146
                 if ($result === true) {
Please login to merge, or discard this patch.
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -128,19 +128,25 @@  discard block
 block discarded – undo
128 128
                     break;
129 129
                 }
130 130
             };
131
-            if ($go) continue;
131
+            if ($go) {
132
+                continue;
133
+            }
132 134
             list($token, $d) = $node->toTokenPair();
133 135
             // base case
134 136
             if ($excludes_enabled && isset($excludes[$node->name])) {
135 137
                 $node->dead = true;
136
-                if ($e) $e->send(E_ERROR, 'Strategy_FixNesting: Node excluded');
138
+                if ($e) {
139
+                    $e->send(E_ERROR, 'Strategy_FixNesting: Node excluded');
140
+                }
137 141
             } else {
138 142
                 // XXX I suppose it would be slightly more efficient to
139 143
                 // avoid the allocation here and have children
140 144
                 // strategies handle it
141 145
                 $children = array();
142 146
                 foreach ($node->children as $child) {
143
-                    if (!$child->dead) $children[] = $child;
147
+                    if (!$child->dead) {
148
+                        $children[] = $child;
149
+                    }
144 150
                 }
145 151
                 $result = $def->child->validateChildren($children, $config, $context);
146 152
                 if ($result === true) {
@@ -148,7 +154,9 @@  discard block
 block discarded – undo
148 154
                     $node->children = $children;
149 155
                 } elseif ($result === false) {
150 156
                     $node->dead = true;
151
-                    if ($e) $e->send(E_ERROR, 'Strategy_FixNesting: Node removed');
157
+                    if ($e) {
158
+                        $e->send(E_ERROR, 'Strategy_FixNesting: Node removed');
159
+                    }
152 160
                 } else {
153 161
                     $node->children = $result;
154 162
                     if ($e) {
Please login to merge, or discard this patch.