diff options
author | Asmir Mustafic <[email protected]> | 2018-11-02 23:00:11 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2018-11-02 23:00:11 +0100 |
commit | 7453ab08dc4c8f65d5db52fd2c6b8943d59bf95b (patch) | |
tree | 7083457d7e3a48a8b2b74f31b59313eea1ca7f45 /src/HTML5.php | |
parent | fb50d43c6c640683d78651535ba46c06e452c628 (diff) | |
parent | 80b8e9177f587365535e9dd6bff45addad9c2bb1 (diff) |
Merge pull request #145 from tgalopin/phpdoc-improvements
Add more extensions on composer.json, improve phpdocs and remove dead code
Diffstat (limited to 'src/HTML5.php')
-rw-r--r-- | src/HTML5.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/HTML5.php b/src/HTML5.php index d5beff6..6c57553 100644 --- a/src/HTML5.php +++ b/src/HTML5.php @@ -2,6 +2,7 @@ namespace Masterminds; use Masterminds\HTML5\Parser\FileInputStream; +use Masterminds\HTML5\Parser\InputStream; use Masterminds\HTML5\Parser\StringInputStream; use Masterminds\HTML5\Parser\DOMTreeBuilder; use Masterminds\HTML5\Parser\Scanner; @@ -160,8 +161,13 @@ class HTML5 * * Lower-level loading function. This requires an input stream instead * of a string, file, or resource. + * + * @param InputStream $input + * @param array $options + * + * @return \DOMDocument */ - public function parse(\Masterminds\HTML5\Parser\InputStream $input, array $options = array()) + public function parse(InputStream $input, array $options = array()) { $this->errors = array(); $options = array_merge($this->getOptions(), $options); @@ -180,8 +186,15 @@ class HTML5 * * Lower-level loading function. This requires an input stream instead * of a string, file, or resource. + * + * @param InputStream $input + * The input data to parse in the form of a InputStream instance. + * @param array $options + * An array of options + * + * @return \DOMDocumentFragment */ - public function parseFragment(\Masterminds\HTML5\Parser\InputStream $input, array $options = array()) + public function parseFragment(InputStream $input, array $options = array()) { $options = array_merge($this->getOptions(), $options); $events = new DOMTreeBuilder(true, $options); |