Skip to content

Commit 69ed5a1

Browse files
committed
Added a token interface which is now implemented in token objects.
Updated docblocks. Moved tokenise.php out of the tokens folder. Fixed issues with minify() expecting certain keys in the $minify array.
1 parent 61944f3 commit 69ed5a1

File tree

10 files changed

+346
-177
lines changed

10 files changed

+346
-177
lines changed

src/autoload.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
<?php
2-
spl_autoload_register(function ($class) {
2+
spl_autoload_register(function (string $class) : bool {
33
$dir = __DIR__.'/htmldoc';
4-
$classes = Array(
4+
$classes = [
55
'hexydec\\html\\htmldoc' => $dir.'/htmldoc.php',
6+
'hexydec\\html\\tokenise' => $dir.'/tokenise.php',
7+
'hexydec\\html\\token' => $dir.'/tokens/interfaces/token.php',
68
'hexydec\\html\\comment' => $dir.'/tokens/comment.php',
79
'hexydec\\html\\doctype' => $dir.'/tokens/doctype.php',
810
'hexydec\\html\\pre' => $dir.'/tokens/pre.php',
911
'hexydec\\html\\script' => $dir.'/tokens/script.php',
1012
'hexydec\\html\\style' => $dir.'/tokens/style.php',
1113
'hexydec\\html\\tag' => $dir.'/tokens/tag.php',
1214
'hexydec\\html\\text' => $dir.'/tokens/text.php',
13-
'hexydec\\html\\cssmin' => $dir.'/cssmin.php',
14-
'hexydec\\html\\tokenise' => $dir.'/tokens/tokenise.php'
15-
);
15+
'hexydec\\html\\cssmin' => $dir.'/cssmin.php'
16+
];
1617
if (isset($classes[$class])) {
1718
return require($classes[$class]);
1819
}

0 commit comments

Comments
 (0)