@@ -40,7 +40,7 @@ |
||
| 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. |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | $this->quirks = $quirks; |
| 247 | 247 | |
| 248 | 248 | if ($this->insertMode > static::IM_INITIAL) { |
| 249 | - $this->parseError('Illegal placement of DOCTYPE tag. Ignoring: ' . $name); |
|
| 249 | + $this->parseError('Illegal placement of DOCTYPE tag. Ignoring: '.$name); |
|
| 250 | 250 | |
| 251 | 251 | return; |
| 252 | 252 | } |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $prefix = ($pos = strpos($lname, ':')) ? substr($lname, 0, $pos) : ''; |
| 370 | 370 | |
| 371 | 371 | if (false !== $needsWorkaround) { |
| 372 | - $xml = "<$lname xmlns=\"$needsWorkaround\" " . (strlen($prefix) && isset($this->nsStack[0][$prefix]) ? ("xmlns:$prefix=\"" . $this->nsStack[0][$prefix] . '"') : '') . '/>'; |
|
| 372 | + $xml = "<$lname xmlns=\"$needsWorkaround\" ".(strlen($prefix) && isset($this->nsStack[0][$prefix]) ? ("xmlns:$prefix=\"".$this->nsStack[0][$prefix].'"') : '').'/>'; |
|
| 373 | 373 | |
| 374 | 374 | $frag = new \DOMDocument('1.0', 'UTF-8'); |
| 375 | 375 | $frag->loadXML($xml); |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | } |
| 529 | 529 | |
| 530 | 530 | if (!$this->autoclose($lname)) { |
| 531 | - $this->parseError('Could not find closing tag for ' . $lname); |
|
| 531 | + $this->parseError('Could not find closing tag for '.$lname); |
|
| 532 | 532 | } |
| 533 | 533 | |
| 534 | 534 | switch ($lname) { |
@@ -559,7 +559,7 @@ discard block |
||
| 559 | 559 | // Per '8.2.5.4.3 The "before head" insertion mode' the characters |
| 560 | 560 | // " \t\n\r\f" should be ignored . |
| 561 | 561 | $dataTmp = trim($data, " \t\n\r\f"); |
| 562 | - if (! empty($dataTmp)) { |
|
| 562 | + if (!empty($dataTmp)) { |
|
| 563 | 563 | $this->startTag('head'); |
| 564 | 564 | $this->endTag('head'); |
| 565 | 565 | $this->startTag('body'); |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | return $this->text($tok); |
| 250 | 250 | } |
| 251 | 251 | |
| 252 | - $sequence = '</' . $this->untilTag . '>'; |
|
| 252 | + $sequence = '</'.$this->untilTag.'>'; |
|
| 253 | 253 | $txt = $this->readUntilSequence($sequence); |
| 254 | 254 | $this->events->text($txt); |
| 255 | 255 | $this->setTextMode(0); |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | return $this->text($tok); |
| 271 | 271 | } |
| 272 | 272 | |
| 273 | - $sequence = '</' . $this->untilTag; |
|
| 273 | + $sequence = '</'.$this->untilTag; |
|
| 274 | 274 | $txt = ''; |
| 275 | 275 | |
| 276 | 276 | $caseSensitive = !Elements::isHtml5Element($this->untilTag); |
@@ -564,11 +564,11 @@ discard block |
||
| 564 | 564 | */ |
| 565 | 565 | protected function quotedAttributeValue($quote) |
| 566 | 566 | { |
| 567 | - $stoplist = "\f" . $quote; |
|
| 567 | + $stoplist = "\f".$quote; |
|
| 568 | 568 | $val = ''; |
| 569 | 569 | |
| 570 | 570 | while (true) { |
| 571 | - $tokens = $this->scanner->charsUntil($stoplist . '&'); |
|
| 571 | + $tokens = $this->scanner->charsUntil($stoplist.'&'); |
|
| 572 | 572 | if (false !== $tokens) { |
| 573 | 573 | $val .= $tokens; |
| 574 | 574 | } else { |
@@ -747,7 +747,7 @@ discard block |
||
| 747 | 747 | $chars = $this->scanner->charsWhile('DOCTYPEdoctype'); |
| 748 | 748 | $this->parseError('Expected DOCTYPE, got %s', $chars); |
| 749 | 749 | |
| 750 | - return $this->bogusComment('<!' . $chars); |
|
| 750 | + return $this->bogusComment('<!'.$chars); |
|
| 751 | 751 | } |
| 752 | 752 | |
| 753 | 753 | $this->scanner->whitespace(); |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | $tok = $this->scanner->current(); |
| 864 | 864 | if ('"' == $tok || "'" == $tok) { |
| 865 | 865 | $this->scanner->consume(); |
| 866 | - $ret = $this->scanner->charsUntil($tok . $stopchars); |
|
| 866 | + $ret = $this->scanner->charsUntil($tok.$stopchars); |
|
| 867 | 867 | if ($this->scanner->current() == $tok) { |
| 868 | 868 | $this->scanner->consume(); |
| 869 | 869 | } else { |
@@ -891,14 +891,14 @@ discard block |
||
| 891 | 891 | if ('CDATA' != $chars || '[' != $this->scanner->current()) { |
| 892 | 892 | $this->parseError('Expected [CDATA[, got %s', $chars); |
| 893 | 893 | |
| 894 | - return $this->bogusComment('<![' . $chars); |
|
| 894 | + return $this->bogusComment('<!['.$chars); |
|
| 895 | 895 | } |
| 896 | 896 | |
| 897 | 897 | $tok = $this->scanner->next(); |
| 898 | 898 | do { |
| 899 | 899 | if (false === $tok) { |
| 900 | 900 | $this->parseError('Unexpected EOF inside CDATA.'); |
| 901 | - $this->bogusComment('<![CDATA[' . $cdata); |
|
| 901 | + $this->bogusComment('<![CDATA['.$cdata); |
|
| 902 | 902 | |
| 903 | 903 | return true; |
| 904 | 904 | } |
@@ -941,7 +941,7 @@ discard block |
||
| 941 | 941 | // If not a PI, send to bogusComment. |
| 942 | 942 | if (0 == strlen($procName) || 0 == $white || false == $this->scanner->current()) { |
| 943 | 943 | $this->parseError("Expected processing instruction name, got $tok"); |
| 944 | - $this->bogusComment('<?' . $tok . $procName); |
|
| 944 | + $this->bogusComment('<?'.$tok.$procName); |
|
| 945 | 945 | |
| 946 | 946 | return true; |
| 947 | 947 | } |
@@ -1021,7 +1021,7 @@ discard block |
||
| 1021 | 1021 | */ |
| 1022 | 1022 | protected function sequenceMatches($sequence, $caseSensitive = true) |
| 1023 | 1023 | { |
| 1024 | - @trigger_error(__METHOD__ . ' method is deprecated since version 2.4 and will be removed in 3.0. Use Scanner::sequenceMatches() instead.', E_USER_DEPRECATED); |
|
| 1024 | + @trigger_error(__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. Use Scanner::sequenceMatches() instead.', E_USER_DEPRECATED); |
|
| 1025 | 1025 | |
| 1026 | 1026 | return $this->scanner->sequenceMatches($sequence, $caseSensitive); |
| 1027 | 1027 | } |