@@ -71,8 +71,9 @@ |
||
| 71 | 71 | public function __construct($data, $encoding = 'UTF-8', $debug = '') |
| 72 | 72 | { |
| 73 | 73 | $data = UTF8Utils::convertToUTF8($data, $encoding); |
| 74 | - if ($debug) |
|
| 75 | - fprintf(STDOUT, $debug, $data, strlen($data)); |
|
| 74 | + if ($debug) { |
|
| 75 | + fprintf(STDOUT, $debug, $data, strlen($data)); |
|
| 76 | + } |
|
| 76 | 77 | |
| 77 | 78 | // There is good reason to question whether it makes sense to |
| 78 | 79 | // do this here, since most of these checks are done during |
@@ -298,13 +298,9 @@ |
||
| 298 | 298 | $this->scanner->next(); // Consume the other '-' |
| 299 | 299 | $this->scanner->next(); // Next char. |
| 300 | 300 | return $this->comment(); |
| 301 | - } |
|
| 302 | - |
|
| 303 | - elseif ($tok == 'D' || $tok == 'd') { // Doctype |
|
| 301 | + } elseif ($tok == 'D' || $tok == 'd') { // Doctype |
|
| 304 | 302 | return $this->doctype(); |
| 305 | - } |
|
| 306 | - |
|
| 307 | - elseif ($tok == '[') { // CDATA section |
|
| 303 | + } elseif ($tok == '[') { // CDATA section |
|
| 308 | 304 | return $this->cdataSection(); |
| 309 | 305 | } |
| 310 | 306 | |
@@ -1,14 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace Masterminds; |
| 3 | 3 | |
| 4 | -use Masterminds\Html5\Parser\FileInputStream; |
|
| 5 | -use Masterminds\Html5\Parser\StringInputStream; |
|
| 6 | -use Masterminds\Html5\Parser\DOMTreeBuilder; |
|
| 7 | -use Masterminds\Html5\Parser\Scanner; |
|
| 8 | -use Masterminds\Html5\Parser\Tokenizer; |
|
| 9 | -use Masterminds\Html5\Serializer\OutputRules; |
|
| 10 | -use Masterminds\Html5\Serializer\Traverser; |
|
| 11 | - |
|
| 12 | 4 | class Html5 extends AbstractHtml5 |
| 13 | 5 | { |
| 14 | 6 | |