Completed
Push — master ( c524ca...754537 )
by Petrus
06:40
created
vendor/ezyang/htmlpurifier/library/HTMLPurifier/Token/Tag.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
46 46
             // normalization only necessary when key is not lowercase
47 47
             if (!ctype_lower($key)) {
48 48
                 $new_key = strtolower($key);
49
-                if (!isset($attr[$new_key])) {
50
-                    $attr[$new_key] = $attr[$key];
49
+                if (!isset($attr[ $new_key ])) {
50
+                    $attr[ $new_key ] = $attr[ $key ];
51 51
                 }
52 52
                 if ($new_key !== $key) {
53
-                    unset($attr[$key]);
53
+                    unset($attr[ $key ]);
54 54
                 }
55 55
             }
56 56
         }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -98,19 +98,19 @@  discard block
 block discarded – undo
98 98
         // flexibly parse it
99 99
         $ret = '';
100 100
         for ($i = 0, $c = strlen($string); $i < $c; $i++) {
101
-            if ($string[$i] === '\\') {
101
+            if ($string[ $i ] === '\\') {
102 102
                 $i++;
103 103
                 if ($i >= $c) {
104 104
                     $ret .= '\\';
105 105
                     break;
106 106
                 }
107
-                if (ctype_xdigit($string[$i])) {
108
-                    $code = $string[$i];
107
+                if (ctype_xdigit($string[ $i ])) {
108
+                    $code = $string[ $i ];
109 109
                     for ($a = 1, $i++; $i < $c && $a < 6; $i++, $a++) {
110
-                        if (!ctype_xdigit($string[$i])) {
110
+                        if (!ctype_xdigit($string[ $i ])) {
111 111
                             break;
112 112
                         }
113
-                        $code .= $string[$i];
113
+                        $code .= $string[ $i ];
114 114
                     }
115 115
                     // We have to be extremely careful when adding
116 116
                     // new characters, to make sure we're not breaking
@@ -120,16 +120,16 @@  discard block
 block discarded – undo
120 120
                         continue;
121 121
                     }
122 122
                     $ret .= $char;
123
-                    if ($i < $c && trim($string[$i]) !== '') {
123
+                    if ($i < $c && trim($string[ $i ]) !== '') {
124 124
                         $i--;
125 125
                     }
126 126
                     continue;
127 127
                 }
128
-                if ($string[$i] === "\n") {
128
+                if ($string[ $i ] === "\n") {
129 129
                     continue;
130 130
                 }
131 131
             }
132
-            $ret .= $string[$i];
132
+            $ret .= $string[ $i ];
133 133
         }
134 134
         return $ret;
135 135
     }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/ErrorCollector.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
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
     /**
@@ -73,23 +73,23 @@  discard block
 block discarded – undo
73 73
         if (func_num_args() > 2) {
74 74
             $args = func_get_args();
75 75
             array_shift($args);
76
-            unset($args[0]);
76
+            unset($args[ 0 ]);
77 77
         }
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
85 85
         $subst = array();
86 86
         if (!is_null($token)) {
87
-            $args['CurrentToken'] = $token;
87
+            $args[ 'CurrentToken' ] = $token;
88 88
         }
89 89
         if (!is_null($attr)) {
90
-            $subst['$CurrentAttr.Name'] = $attr;
91
-            if (isset($token->attr[$attr])) {
92
-                $subst['$CurrentAttr.Value'] = $token->attr[$attr];
90
+            $subst[ '$CurrentAttr.Name' ] = $attr;
91
+            if (isset($token->attr[ $attr ])) {
92
+                $subst[ '$CurrentAttr.Value' ] = $token->attr[ $attr ];
93 93
             }
94 94
         }
95 95
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             self::MESSAGE  => $msg,
111 111
             self::CHILDREN => array()
112 112
         );
113
-        $this->_current[] = $error;
113
+        $this->_current[ ] = $error;
114 114
 
115 115
         // NEW CODE BELOW ...
116 116
         // Top-level errors are either:
@@ -122,18 +122,18 @@  discard block
 block discarded – undo
122 122
             $new_struct->value = clone $token;
123 123
         }
124 124
         if (is_int($line) && is_int($col)) {
125
-            if (isset($this->lines[$line][$col])) {
126
-                $struct = $this->lines[$line][$col];
125
+            if (isset($this->lines[ $line ][ $col ])) {
126
+                $struct = $this->lines[ $line ][ $col ];
127 127
             } else {
128
-                $struct = $this->lines[$line][$col] = $new_struct;
128
+                $struct = $this->lines[ $line ][ $col ] = $new_struct;
129 129
             }
130 130
             // These ksorts may present a performance problem
131
-            ksort($this->lines[$line], SORT_NUMERIC);
131
+            ksort($this->lines[ $line ], SORT_NUMERIC);
132 132
         } else {
133
-            if (isset($this->lines[-1])) {
134
-                $struct = $this->lines[-1];
133
+            if (isset($this->lines[-1 ])) {
134
+                $struct = $this->lines[-1 ];
135 135
             } else {
136
-                $struct = $this->lines[-1] = $new_struct;
136
+                $struct = $this->lines[-1 ] = $new_struct;
137 137
             }
138 138
         }
139 139
         ksort($this->lines, SORT_NUMERIC);
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
                 $this->_renderStruct($ret, $struct, $line, $col);
192 192
             }
193 193
         }
194
-        if (isset($this->lines[-1])) {
195
-            $this->_renderStruct($ret, $this->lines[-1]);
194
+        if (isset($this->lines[-1 ])) {
195
+            $this->_renderStruct($ret, $this->lines[-1 ]);
196 196
         }
197 197
 
198 198
         if (empty($errors)) {
199
-            return '<p>' . $this->locale->getMessage('ErrorCollector: No errors') . '</p>';
199
+            return '<p>'.$this->locale->getMessage('ErrorCollector: No errors').'</p>';
200 200
         } else {
201
-            return '<ul><li>' . implode('</li><li>', $ret) . '</li></ul>';
201
+            return '<ul><li>'.implode('</li><li>', $ret).'</li></ul>';
202 202
         }
203 203
 
204 204
     }
@@ -221,20 +221,20 @@  discard block
 block discarded – undo
221 221
                 } else {
222 222
                     $string .= '<em class="location">End of Document: </em> ';
223 223
                 }
224
-                $string .= '<strong class="description">' . $this->generator->escape($msg) . '</strong> ';
224
+                $string .= '<strong class="description">'.$this->generator->escape($msg).'</strong> ';
225 225
                 $string .= '</div>';
226 226
                 // Here, have a marker for the character on the column appropriate.
227 227
                 // Be sure to clip extremely long lines.
228 228
                 //$string .= '<pre>';
229 229
                 //$string .= '';
230 230
                 //$string .= '</pre>';
231
-                $ret[] = $string;
231
+                $ret[ ] = $string;
232 232
             }
233 233
             foreach ($current->children as $array) {
234
-                $context[] = $current;
234
+                $context[ ] = $current;
235 235
                 $stack = array_merge($stack, array_reverse($array, true));
236 236
                 for ($i = count($array); $i > 0; $i--) {
237
-                    $context_stack[] = $context;
237
+                    $context_stack[ ] = $context;
238 238
                 }
239 239
             }
240 240
         }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/EntityLookup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     public function setup($file = false)
22 22
     {
23 23
         if (!$file) {
24
-            $file = HTMLPURIFIER_PREFIX . '/HTMLPurifier/EntityLookup/entities.ser';
24
+            $file = HTMLPURIFIER_PREFIX.'/HTMLPurifier/EntityLookup/entities.ser';
25 25
         }
26 26
         $this->table = unserialize(file_get_contents($file));
27 27
     }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Textarea.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@
 block discarded – undo
14 14
     public function transform($attr, $config, $context)
15 15
     {
16 16
         // Calculated from Firefox
17
-        if (!isset($attr['cols'])) {
18
-            $attr['cols'] = '22';
17
+        if (!isset($attr[ 'cols' ])) {
18
+            $attr[ 'cols' ] = '22';
19 19
         }
20
-        if (!isset($attr['rows'])) {
21
-            $attr['rows'] = '3';
20
+        if (!isset($attr[ 'rows' ])) {
21
+            $attr[ 'rows' ] = '3';
22 22
         }
23 23
         return $attr;
24 24
     }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Lang.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
      */
17 17
     public function transform($attr, $config, $context)
18 18
     {
19
-        $lang = isset($attr['lang']) ? $attr['lang'] : false;
20
-        $xml_lang = isset($attr['xml:lang']) ? $attr['xml:lang'] : false;
19
+        $lang = isset($attr[ 'lang' ]) ? $attr[ 'lang' ] : false;
20
+        $xml_lang = isset($attr[ 'xml:lang' ]) ? $attr[ 'xml:lang' ] : false;
21 21
 
22 22
         if ($lang !== false && $xml_lang === false) {
23
-            $attr['xml:lang'] = $lang;
23
+            $attr[ 'xml:lang' ] = $lang;
24 24
         } elseif ($xml_lang !== false) {
25
-            $attr['lang'] = $xml_lang;
25
+            $attr[ 'lang' ] = $xml_lang;
26 26
         }
27 27
         return $attr;
28 28
     }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BgColor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function transform($attr, $config, $context)
15 15
     {
16
-        if (!isset($attr['bgcolor'])) {
16
+        if (!isset($attr[ 'bgcolor' ])) {
17 17
             return $attr;
18 18
         }
19 19
 
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ImgSpace.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
     public function __construct($attr)
25 25
     {
26 26
         $this->attr = $attr;
27
-        if (!isset($this->css[$attr])) {
28
-            trigger_error(htmlspecialchars($attr) . ' is not valid space attribute');
27
+        if (!isset($this->css[ $attr ])) {
28
+            trigger_error(htmlspecialchars($attr).' is not valid space attribute');
29 29
         }
30 30
     }
31 31
 
@@ -37,19 +37,19 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function transform($attr, $config, $context)
39 39
     {
40
-        if (!isset($attr[$this->attr])) {
40
+        if (!isset($attr[ $this->attr ])) {
41 41
             return $attr;
42 42
         }
43 43
 
44 44
         $width = $this->confiscateAttr($attr, $this->attr);
45 45
         // some validation could happen here
46 46
 
47
-        if (!isset($this->css[$this->attr])) {
47
+        if (!isset($this->css[ $this->attr ])) {
48 48
             return $attr;
49 49
         }
50 50
 
51 51
         $style = '';
52
-        foreach ($this->css[$this->attr] as $suffix) {
52
+        foreach ($this->css[ $this->attr ] as $suffix) {
53 53
             $property = "margin-$suffix";
54 54
             $style .= "$property:{$width}px;";
55 55
         }
Please login to merge, or discard this patch.
ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetBlank.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,16 +27,16 @@
 block discarded – undo
27 27
      */
28 28
     public function transform($attr, $config, $context)
29 29
     {
30
-        if (!isset($attr['href'])) {
30
+        if (!isset($attr[ 'href' ])) {
31 31
             return $attr;
32 32
         }
33 33
 
34 34
         // XXX Kind of inefficient
35
-        $url = $this->parser->parse($attr['href']);
35
+        $url = $this->parser->parse($attr[ 'href' ]);
36 36
         $scheme = $url->getSchemeObj($config, $context);
37 37
 
38 38
         if ($scheme->browsable && !$url->isBenign($config, $context)) {
39
-            $attr['target'] = '_blank';
39
+            $attr[ 'target' ] = '_blank';
40 40
         }
41 41
         return $attr;
42 42
     }
Please login to merge, or discard this patch.