Completed
Pull Request — master (#259)
by Oliver
16s
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   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             return $this->text($tok);
253 253
         }
254 254
 
255
-        $sequence = '</' . $this->untilTag . '>';
255
+        $sequence = '</'.$this->untilTag.'>';
256 256
         $txt = $this->readUntilSequence($sequence);
257 257
         $this->events->text($txt);
258 258
         $this->setTextMode(0);
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
             return $this->text($tok);
274 274
         }
275 275
 
276
-        $sequence = '</' . $this->untilTag;
276
+        $sequence = '</'.$this->untilTag;
277 277
         $txt = '';
278 278
 
279 279
         $caseSensitive = !Elements::isHtml5Element($this->untilTag);
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
         $this->scanner->whitespace();
508 508
 
509 509
         $val = $this->attributeValue();
510
-        if ($isValidAttribute  && !array_key_exists($name, $attributes)) {
510
+        if ($isValidAttribute && !array_key_exists($name, $attributes)) {
511 511
             $attributes[$name] = $val;
512 512
         }
513 513
 
@@ -567,11 +567,11 @@  discard block
 block discarded – undo
567 567
      */
568 568
     protected function quotedAttributeValue($quote)
569 569
     {
570
-        $stoplist = "\f" . $quote;
570
+        $stoplist = "\f".$quote;
571 571
         $val = '';
572 572
 
573 573
         while (true) {
574
-            $tokens = $this->scanner->charsUntil($stoplist . '&');
574
+            $tokens = $this->scanner->charsUntil($stoplist.'&');
575 575
             if (false !== $tokens) {
576 576
                 $val .= $tokens;
577 577
             } else {
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
             $chars = $this->scanner->charsWhile('DOCTYPEdoctype');
758 758
             $this->parseError('Expected DOCTYPE, got %s', $chars);
759 759
 
760
-            return $this->bogusComment('<!' . $chars);
760
+            return $this->bogusComment('<!'.$chars);
761 761
         }
762 762
 
763 763
         $this->scanner->whitespace();
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
         $tok = $this->scanner->current();
874 874
         if ('"' == $tok || "'" == $tok) {
875 875
             $this->scanner->consume();
876
-            $ret = $this->scanner->charsUntil($tok . $stopchars);
876
+            $ret = $this->scanner->charsUntil($tok.$stopchars);
877 877
             if ($this->scanner->current() == $tok) {
878 878
                 $this->scanner->consume();
879 879
             } else {
@@ -901,14 +901,14 @@  discard block
 block discarded – undo
901 901
         if ('CDATA' != $chars || '[' != $this->scanner->current()) {
902 902
             $this->parseError('Expected [CDATA[, got %s', $chars);
903 903
 
904
-            return $this->bogusComment('<![' . $chars);
904
+            return $this->bogusComment('<!['.$chars);
905 905
         }
906 906
 
907 907
         $tok = $this->scanner->next();
908 908
         do {
909 909
             if (false === $tok) {
910 910
                 $this->parseError('Unexpected EOF inside CDATA.');
911
-                $this->bogusComment('<![CDATA[' . $cdata);
911
+                $this->bogusComment('<![CDATA['.$cdata);
912 912
 
913 913
                 return true;
914 914
             }
@@ -951,7 +951,7 @@  discard block
 block discarded – undo
951 951
         // If not a PI, send to bogusComment.
952 952
         if (0 == strlen($procName) || 0 == $white || false == $this->scanner->current()) {
953 953
             $this->parseError("Expected processing instruction name, got $tok");
954
-            $this->bogusComment('<?' . $tok . $procName);
954
+            $this->bogusComment('<?'.$tok.$procName);
955 955
 
956 956
             return true;
957 957
         }
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
      */
1032 1032
     protected function sequenceMatches($sequence, $caseSensitive = true)
1033 1033
     {
1034
-        @trigger_error(__METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0. Use Scanner::sequenceMatches() instead.', E_USER_DEPRECATED);
1034
+        @trigger_error(__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. Use Scanner::sequenceMatches() instead.', E_USER_DEPRECATED);
1035 1035
 
1036 1036
         return $this->scanner->sequenceMatches($sequence, $caseSensitive);
1037 1037
     }
Please login to merge, or discard this patch.