Completed
Pull Request — master (#158)
by Christophe
02:18
created
src/HTML5/Parser/CharacterReference.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public static function lookupDecimal($int)
42 42
     {
43
-        $entity = '&#' . $int . ';';
43
+        $entity = '&#'.$int.';';
44 44
 
45 45
         // UNTESTED: This may fail on some planes. Couldn't find full documentation
46 46
         // on the value of the mask array.
Please login to merge, or discard this patch.
src/HTML5/Parser/DOMTreeBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         $this->quirks = $quirks;
246 246
 
247 247
         if ($this->insertMode > static::IM_INITIAL) {
248
-            $this->parseError('Illegal placement of DOCTYPE tag. Ignoring: ' . $name);
248
+            $this->parseError('Illegal placement of DOCTYPE tag. Ignoring: '.$name);
249 249
 
250 250
             return;
251 251
         }
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
             $prefix = ($pos = strpos($lname, ':')) ? substr($lname, 0, $pos) : '';
363 363
 
364 364
             if (false !== $needsWorkaround) {
365
-                $xml = "<$lname xmlns=\"$needsWorkaround\" " . (strlen($prefix) && isset($this->nsStack[0][$prefix]) ? ("xmlns:$prefix=\"" . $this->nsStack[0][$prefix] . '"') : '') . '/>';
365
+                $xml = "<$lname xmlns=\"$needsWorkaround\" ".(strlen($prefix) && isset($this->nsStack[0][$prefix]) ? ("xmlns:$prefix=\"".$this->nsStack[0][$prefix].'"') : '').'/>';
366 366
 
367 367
                 $frag = new \DOMDocument('1.0', 'UTF-8');
368 368
                 $frag->loadXML($xml);
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
         }
532 532
 
533 533
         if (!$this->autoclose($lname)) {
534
-            $this->parseError('Could not find closing tag for ' . $lname);
534
+            $this->parseError('Could not find closing tag for '.$lname);
535 535
         }
536 536
 
537 537
         switch ($lname) {
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
             $dataTmp = trim($data, " \t\n\r\f");
567 567
             if (!empty($dataTmp)) {
568 568
                 // fprintf(STDOUT, "Unexpected insert mode: %d", $this->insertMode);
569
-                $this->parseError('Unexpected text. Ignoring: ' . $dataTmp);
569
+                $this->parseError('Unexpected text. Ignoring: '.$dataTmp);
570 570
             }
571 571
 
572 572
             return;
Please login to merge, or discard this patch.
src/HTML5/Parser/Tokenizer.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
             return $this->text($tok);
240 240
         }
241 241
 
242
-        $sequence = '</' . $this->untilTag . '>';
242
+        $sequence = '</'.$this->untilTag.'>';
243 243
         $txt = $this->readUntilSequence($sequence);
244 244
         $this->events->text($txt);
245 245
         $this->setTextMode(0);
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
             return $this->text($tok);
261 261
         }
262 262
 
263
-        $sequence = '</' . $this->untilTag;
263
+        $sequence = '</'.$this->untilTag;
264 264
         $txt = '';
265 265
 
266 266
         $caseSensitive = !Elements::isHtml5Element($this->untilTag);
@@ -569,11 +569,11 @@  discard block
 block discarded – undo
569 569
      */
570 570
     protected function quotedAttributeValue($quote)
571 571
     {
572
-        $stoplist = "\f" . $quote;
572
+        $stoplist = "\f".$quote;
573 573
         $val = '';
574 574
 
575 575
         while (true) {
576
-            $tokens = $this->scanner->charsUntil($stoplist . '&');
576
+            $tokens = $this->scanner->charsUntil($stoplist.'&');
577 577
             if (false !== $tokens) {
578 578
                 $val .= $tokens;
579 579
             } else {
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
         if (strcasecmp($chars, 'DOCTYPE')) {
736 736
             $this->parseError('Expected DOCTYPE, got %s', $chars);
737 737
 
738
-            return $this->bogusComment('<!' . $chars);
738
+            return $this->bogusComment('<!'.$chars);
739 739
         }
740 740
 
741 741
         $this->scanner->whitespace();
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
         $tok = $this->scanner->current();
851 851
         if ('"' == $tok || "'" == $tok) {
852 852
             $this->scanner->consume();
853
-            $ret = $this->scanner->charsUntil($tok . $stopchars);
853
+            $ret = $this->scanner->charsUntil($tok.$stopchars);
854 854
             if ($this->scanner->current() == $tok) {
855 855
                 $this->scanner->consume();
856 856
             } else {
@@ -881,14 +881,14 @@  discard block
 block discarded – undo
881 881
         if ('CDATA' != $chars || '[' != $this->scanner->current()) {
882 882
             $this->parseError('Expected [CDATA[, got %s', $chars);
883 883
 
884
-            return $this->bogusComment('<![' . $chars);
884
+            return $this->bogusComment('<!['.$chars);
885 885
         }
886 886
 
887 887
         $tok = $this->scanner->next();
888 888
         do {
889 889
             if (false === $tok) {
890 890
                 $this->parseError('Unexpected EOF inside CDATA.');
891
-                $this->bogusComment('<![CDATA[' . $cdata);
891
+                $this->bogusComment('<![CDATA['.$cdata);
892 892
 
893 893
                 return true;
894 894
             }
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
         // If not a PI, send to bogusComment.
932 932
         if (0 == strlen($procName) || 0 == $white || false == $this->scanner->current()) {
933 933
             $this->parseError("Expected processing instruction name, got $tok");
934
-            $this->bogusComment('<?' . $tok . $procName);
934
+            $this->bogusComment('<?'.$tok.$procName);
935 935
 
936 936
             return true;
937 937
         }
@@ -1011,7 +1011,7 @@  discard block
 block discarded – undo
1011 1011
      */
1012 1012
     protected function sequenceMatches($sequence, $caseSensitive = true)
1013 1013
     {
1014
-        @trigger_error(__METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0. Use Scanner::sequenceMatches() instead.', E_USER_DEPRECATED);
1014
+        @trigger_error(__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. Use Scanner::sequenceMatches() instead.', E_USER_DEPRECATED);
1015 1015
 
1016 1016
         return $this->scanner->sequenceMatches($sequence, $caseSensitive);
1017 1017
     }
@@ -1092,7 +1092,7 @@  discard block
 block discarded – undo
1092 1092
 
1093 1093
         // These indicate not an entity. We return just
1094 1094
         // the &.
1095
-        if (1 === strspn($tok, static::WHITE . '&<')) {
1095
+        if (1 === strspn($tok, static::WHITE.'&<')) {
1096 1096
             // $this->scanner->next();
1097 1097
             return '&';
1098 1098
         }
@@ -1174,6 +1174,6 @@  discard block
 block discarded – undo
1174 1174
 
1175 1175
         $this->parseError('Expected &ENTITY;, got &ENTITY%s (no trailing ;) ', $tok);
1176 1176
 
1177
-        return '&' . $entity;
1177
+        return '&'.$entity;
1178 1178
     }
1179 1179
 }
Please login to merge, or discard this patch.