Completed
Push — master ( 8dad79...d56976 )
by Lars
02:45 queued 16s
created
src/voku/helper/HtmlMin.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
     $this->protectedChildNodes = array();
119 119
     $this->randomHash = md5(Bootup::get_random_bytes(16));
120 120
 
121
-    $this->protectedChildNodesHelper = 'html-min--saved-content-' . $this->randomHash;
122
-    $this->booleanAttributesHelper = 'html-min--delete-this-' . $this->randomHash;
121
+    $this->protectedChildNodesHelper = 'html-min--saved-content-'.$this->randomHash;
122
+    $this->booleanAttributesHelper = 'html-min--delete-this-'.$this->randomHash;
123 123
   }
124 124
 
125 125
   /**
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
    */
130 130
   public function minify($html)
131 131
   {
132
-    $html = (string)$html;
132
+    $html = (string) $html;
133 133
     if (!isset($html[0])) {
134 134
       return '';
135 135
     }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     // -------------------------------------------------------------------------
175 175
 
176 176
     $html = preg_replace_callback(
177
-        '/<(?<element>' . $this->protectedChildNodesHelper . ')(?<attributes> [^>]*)?>(?<value>.*?)<\/' . $this->protectedChildNodesHelper . '>/',
177
+        '/<(?<element>'.$this->protectedChildNodesHelper.')(?<attributes> [^>]*)?>(?<value>.*?)<\/'.$this->protectedChildNodesHelper.'>/',
178 178
         array($this, 'restoreProtectedHtml'),
179 179
         $html
180 180
     );
@@ -188,11 +188,11 @@  discard block
 block discarded – undo
188 188
 
189 189
     $html = str_replace(
190 190
         array(
191
-            'html>' . "\n",
192
-            "\n" . '<html',
191
+            'html>'."\n",
192
+            "\n".'<html',
193 193
             '<!doctype',
194
-            '="' . $this->booleanAttributesHelper . '"',
195
-            '</' . $this->protectedChildNodesHelper . '>',
194
+            '="'.$this->booleanAttributesHelper.'"',
195
+            '</'.$this->protectedChildNodesHelper.'>',
196 196
         ),
197 197
         array(
198 198
             'html>',
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 
207 207
     $html = preg_replace(
208 208
         array(
209
-            '/<(?:' . $this->protectedChildNodesHelper . ')(:? [^>]*)?>/',
209
+            '/<(?:'.$this->protectedChildNodesHelper.')(:? [^>]*)?>/',
210 210
         ),
211 211
         array(
212 212
             '',
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
       if (!$class) {
501 501
         continue;
502 502
       }
503
-      $attrValue .= trim($class) . ' ';
503
+      $attrValue .= trim($class).' ';
504 504
     }
505 505
     $attrValue = trim($attrValue);
506 506
 
Please login to merge, or discard this patch.