Completed
Push — master ( c524ca...754537 )
by Petrus
06:40
created
ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/ScriptRequired.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
      */
14 14
     public function transform($attr, $config, $context)
15 15
     {
16
-        if (!isset($attr['type'])) {
17
-            $attr['type'] = 'text/javascript';
16
+        if (!isset($attr[ 'type' ])) {
17
+            $attr[ 'type' ] = 'text/javascript';
18 18
         }
19 19
         return $attr;
20 20
     }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/Nofollow.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,23 +26,23 @@
 block discarded – undo
26 26
      */
27 27
     public function transform($attr, $config, $context)
28 28
     {
29
-        if (!isset($attr['href'])) {
29
+        if (!isset($attr[ 'href' ])) {
30 30
             return $attr;
31 31
         }
32 32
 
33 33
         // XXX Kind of inefficient
34
-        $url = $this->parser->parse($attr['href']);
34
+        $url = $this->parser->parse($attr[ 'href' ]);
35 35
         $scheme = $url->getSchemeObj($config, $context);
36 36
 
37 37
         if ($scheme->browsable && !$url->isLocal($config, $context)) {
38
-            if (isset($attr['rel'])) {
39
-                $rels = explode(' ', $attr['rel']);
38
+            if (isset($attr[ 'rel' ])) {
39
+                $rels = explode(' ', $attr[ 'rel' ]);
40 40
                 if (!in_array('nofollow', $rels)) {
41
-                    $rels[] = 'nofollow';
41
+                    $rels[ ] = 'nofollow';
42 42
                 }
43
-                $attr['rel'] = implode(' ', $rels);
43
+                $attr[ 'rel' ] = implode(' ', $rels);
44 44
             } else {
45
-                $attr['rel'] = 'nofollow';
45
+                $attr[ 'rel' ] = 'nofollow';
46 46
             }
47 47
         }
48 48
         return $attr;
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/SafeEmbed.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
15 15
      */
16 16
     public function transform($attr, $config, $context)
17 17
     {
18
-        $attr['allowscriptaccess'] = 'never';
19
-        $attr['allownetworking'] = 'internal';
20
-        $attr['type'] = 'application/x-shockwave-flash';
18
+        $attr[ 'allowscriptaccess' ] = 'never';
19
+        $attr[ 'allownetworking' ] = 'internal';
20
+        $attr[ 'type' ] = 'application/x-shockwave-flash';
21 21
         return $attr;
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/BoolToCSS.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
      */
36 36
     public function transform($attr, $config, $context)
37 37
     {
38
-        if (!isset($attr[$this->attr])) {
38
+        if (!isset($attr[ $this->attr ])) {
39 39
             return $attr;
40 40
         }
41
-        unset($attr[$this->attr]);
41
+        unset($attr[ $this->attr ]);
42 42
         $this->prependCSS($attr, $this->css);
43 43
         return $attr;
44 44
     }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/ConfigSchema.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public static function makeFromSerial()
70 70
     {
71
-        $contents = file_get_contents(HTMLPURIFIER_PREFIX . '/HTMLPurifier/ConfigSchema/schema.ser');
71
+        $contents = file_get_contents(HTMLPURIFIER_PREFIX.'/HTMLPurifier/ConfigSchema/schema.ser');
72 72
         $r = unserialize($contents);
73 73
         if (!$r) {
74 74
             $hash = sha1($contents);
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
     public function add($key, $default, $type, $allow_null)
107 107
     {
108 108
         $obj = new stdclass();
109
-        $obj->type = is_int($type) ? $type : HTMLPurifier_VarParser::$types[$type];
109
+        $obj->type = is_int($type) ? $type : HTMLPurifier_VarParser::$types[ $type ];
110 110
         if ($allow_null) {
111 111
             $obj->allow_null = true;
112 112
         }
113
-        $this->info[$key] = $obj;
114
-        $this->defaults[$key] = $default;
113
+        $this->info[ $key ] = $obj;
114
+        $this->defaults[ $key ] = $default;
115 115
         $this->defaultPlist->set($key, $default);
116 116
     }
117 117
 
@@ -125,11 +125,11 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function addValueAliases($key, $aliases)
127 127
     {
128
-        if (!isset($this->info[$key]->aliases)) {
129
-            $this->info[$key]->aliases = array();
128
+        if (!isset($this->info[ $key ]->aliases)) {
129
+            $this->info[ $key ]->aliases = array();
130 130
         }
131 131
         foreach ($aliases as $alias => $real) {
132
-            $this->info[$key]->aliases[$alias] = $real;
132
+            $this->info[ $key ]->aliases[ $alias ] = $real;
133 133
         }
134 134
     }
135 135
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public function addAllowedValues($key, $allowed)
144 144
     {
145
-        $this->info[$key]->allowed = $allowed;
145
+        $this->info[ $key ]->allowed = $allowed;
146 146
     }
147 147
 
148 148
     /**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $obj = new stdclass;
156 156
         $obj->key = $new_key;
157 157
         $obj->isAlias = true;
158
-        $this->info[$key] = $obj;
158
+        $this->info[ $key ] = $obj;
159 159
     }
160 160
 
161 161
     /**
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
     {
166 166
         foreach ($this->info as $key => $v) {
167 167
             if (count((array) $v) == 1) {
168
-                $this->info[$key] = $v->type;
168
+                $this->info[ $key ] = $v->type;
169 169
             } elseif (count((array) $v) == 2 && isset($v->allow_null)) {
170
-                $this->info[$key] = -$v->type;
170
+                $this->info[ $key ] = -$v->type;
171 171
             }
172 172
         }
173 173
     }
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Bdo.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@
 block discarded – undo
35 35
                 // inclusions wrong for bdo: bdo allows Lang
36 36
             )
37 37
         );
38
-        $bdo->attr_transform_post[] = new HTMLPurifier_AttrTransform_BdoDir();
38
+        $bdo->attr_transform_post[ ] = new HTMLPurifier_AttrTransform_BdoDir();
39 39
 
40
-        $this->attr_collections['I18N']['dir'] = 'Enum#ltr,rtl';
40
+        $this->attr_collections[ 'I18N' ][ 'dir' ] = 'Enum#ltr,rtl';
41 41
     }
42 42
 }
43 43
 
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/TargetBlank.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function setup($config)
18 18
     {
19 19
         $a = $this->addBlankElement('a');
20
-        $a->attr_transform_post[] = new HTMLPurifier_AttrTransform_TargetBlank();
20
+        $a->attr_transform_post[ ] = new HTMLPurifier_AttrTransform_TargetBlank();
21 21
     }
22 22
 }
23 23
 
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/SafeObject.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
                 // While technically not required by the spec, we're forcing
32 32
                 // it to this value.
33 33
                 'type' => 'Enum#application/x-shockwave-flash',
34
-                'width' => 'Pixels#' . $max,
35
-                'height' => 'Pixels#' . $max,
34
+                'width' => 'Pixels#'.$max,
35
+                'height' => 'Pixels#'.$max,
36 36
                 'data' => 'URI#embedded',
37 37
                 'codebase' => new HTMLPurifier_AttrDef_Enum(
38 38
                     array(
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                 ),
42 42
             )
43 43
         );
44
-        $object->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeObject();
44
+        $object->attr_transform_post[ ] = new HTMLPurifier_AttrTransform_SafeObject();
45 45
 
46 46
         $param = $this->addElement(
47 47
             'param',
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
                 'value' => 'Text'
55 55
             )
56 56
         );
57
-        $param->attr_transform_post[] = new HTMLPurifier_AttrTransform_SafeParam();
58
-        $this->info_injector[] = 'SafeObject';
57
+        $param->attr_transform_post[ ] = new HTMLPurifier_AttrTransform_SafeParam();
58
+        $this->info_injector[ ] = 'SafeObject';
59 59
     }
60 60
 }
61 61
 
Please login to merge, or discard this patch.
vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Legacy.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -95,75 +95,75 @@  discard block
 block discarded – undo
95 95
         $blockquote->child = false;
96 96
 
97 97
         $br = $this->addBlankElement('br');
98
-        $br->attr['clear'] = 'Enum#left,all,right,none';
98
+        $br->attr[ 'clear' ] = 'Enum#left,all,right,none';
99 99
 
100 100
         $caption = $this->addBlankElement('caption');
101
-        $caption->attr['align'] = 'Enum#top,bottom,left,right';
101
+        $caption->attr[ 'align' ] = 'Enum#top,bottom,left,right';
102 102
 
103 103
         $div = $this->addBlankElement('div');
104
-        $div->attr['align'] = $align;
104
+        $div->attr[ 'align' ] = $align;
105 105
 
106 106
         $dl = $this->addBlankElement('dl');
107
-        $dl->attr['compact'] = 'Bool#compact';
107
+        $dl->attr[ 'compact' ] = 'Bool#compact';
108 108
 
109 109
         for ($i = 1; $i <= 6; $i++) {
110 110
             $h = $this->addBlankElement("h$i");
111
-            $h->attr['align'] = $align;
111
+            $h->attr[ 'align' ] = $align;
112 112
         }
113 113
 
114 114
         $hr = $this->addBlankElement('hr');
115
-        $hr->attr['align'] = $align;
116
-        $hr->attr['noshade'] = 'Bool#noshade';
117
-        $hr->attr['size'] = 'Pixels';
118
-        $hr->attr['width'] = 'Length';
115
+        $hr->attr[ 'align' ] = $align;
116
+        $hr->attr[ 'noshade' ] = 'Bool#noshade';
117
+        $hr->attr[ 'size' ] = 'Pixels';
118
+        $hr->attr[ 'width' ] = 'Length';
119 119
 
120 120
         $img = $this->addBlankElement('img');
121
-        $img->attr['align'] = 'IAlign';
122
-        $img->attr['border'] = 'Pixels';
123
-        $img->attr['hspace'] = 'Pixels';
124
-        $img->attr['vspace'] = 'Pixels';
121
+        $img->attr[ 'align' ] = 'IAlign';
122
+        $img->attr[ 'border' ] = 'Pixels';
123
+        $img->attr[ 'hspace' ] = 'Pixels';
124
+        $img->attr[ 'vspace' ] = 'Pixels';
125 125
 
126 126
         // figure out this integer business
127 127
 
128 128
         $li = $this->addBlankElement('li');
129
-        $li->attr['value'] = new HTMLPurifier_AttrDef_Integer();
130
-        $li->attr['type'] = 'Enum#s:1,i,I,a,A,disc,square,circle';
129
+        $li->attr[ 'value' ] = new HTMLPurifier_AttrDef_Integer();
130
+        $li->attr[ 'type' ] = 'Enum#s:1,i,I,a,A,disc,square,circle';
131 131
 
132 132
         $ol = $this->addBlankElement('ol');
133
-        $ol->attr['compact'] = 'Bool#compact';
134
-        $ol->attr['start'] = new HTMLPurifier_AttrDef_Integer();
135
-        $ol->attr['type'] = 'Enum#s:1,i,I,a,A';
133
+        $ol->attr[ 'compact' ] = 'Bool#compact';
134
+        $ol->attr[ 'start' ] = new HTMLPurifier_AttrDef_Integer();
135
+        $ol->attr[ 'type' ] = 'Enum#s:1,i,I,a,A';
136 136
 
137 137
         $p = $this->addBlankElement('p');
138
-        $p->attr['align'] = $align;
138
+        $p->attr[ 'align' ] = $align;
139 139
 
140 140
         $pre = $this->addBlankElement('pre');
141
-        $pre->attr['width'] = 'Number';
141
+        $pre->attr[ 'width' ] = 'Number';
142 142
 
143 143
         // script omitted
144 144
 
145 145
         $table = $this->addBlankElement('table');
146
-        $table->attr['align'] = 'Enum#left,center,right';
147
-        $table->attr['bgcolor'] = 'Color';
146
+        $table->attr[ 'align' ] = 'Enum#left,center,right';
147
+        $table->attr[ 'bgcolor' ] = 'Color';
148 148
 
149 149
         $tr = $this->addBlankElement('tr');
150
-        $tr->attr['bgcolor'] = 'Color';
150
+        $tr->attr[ 'bgcolor' ] = 'Color';
151 151
 
152 152
         $th = $this->addBlankElement('th');
153
-        $th->attr['bgcolor'] = 'Color';
154
-        $th->attr['height'] = 'Length';
155
-        $th->attr['nowrap'] = 'Bool#nowrap';
156
-        $th->attr['width'] = 'Length';
153
+        $th->attr[ 'bgcolor' ] = 'Color';
154
+        $th->attr[ 'height' ] = 'Length';
155
+        $th->attr[ 'nowrap' ] = 'Bool#nowrap';
156
+        $th->attr[ 'width' ] = 'Length';
157 157
 
158 158
         $td = $this->addBlankElement('td');
159
-        $td->attr['bgcolor'] = 'Color';
160
-        $td->attr['height'] = 'Length';
161
-        $td->attr['nowrap'] = 'Bool#nowrap';
162
-        $td->attr['width'] = 'Length';
159
+        $td->attr[ 'bgcolor' ] = 'Color';
160
+        $td->attr[ 'height' ] = 'Length';
161
+        $td->attr[ 'nowrap' ] = 'Bool#nowrap';
162
+        $td->attr[ 'width' ] = 'Length';
163 163
 
164 164
         $ul = $this->addBlankElement('ul');
165
-        $ul->attr['compact'] = 'Bool#compact';
166
-        $ul->attr['type'] = 'Enum#square,disc,circle';
165
+        $ul->attr[ 'compact' ] = 'Bool#compact';
166
+        $ul->attr[ 'type' ] = 'Enum#square,disc,circle';
167 167
 
168 168
         // "safe" modifications to "unsafe" elements
169 169
         // WARNING: If you want to add support for an unsafe, legacy
@@ -173,13 +173,13 @@  discard block
 block discarded – undo
173 173
         $form = $this->addBlankElement('form');
174 174
         $form->content_model = 'Flow | #PCDATA';
175 175
         $form->content_model_type = 'optional';
176
-        $form->attr['target'] = 'FrameTarget';
176
+        $form->attr[ 'target' ] = 'FrameTarget';
177 177
 
178 178
         $input = $this->addBlankElement('input');
179
-        $input->attr['align'] = 'IAlign';
179
+        $input->attr[ 'align' ] = 'IAlign';
180 180
 
181 181
         $legend = $this->addBlankElement('legend');
182
-        $legend->attr['align'] = 'LAlign';
182
+        $legend->attr[ 'align' ] = 'LAlign';
183 183
     }
184 184
 }
185 185
 
Please login to merge, or discard this patch.