From 80b8e9177f587365535e9dd6bff45addad9c2bb1 Mon Sep 17 00:00:00 2001 From: Titouan Galopin Date: Mon, 22 Oct 2018 23:49:05 +0200 Subject: Add more extensions on composer.json, improve phpdocs and remove dead code --- src/HTML5.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/HTML5.php') 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); -- cgit v1.2.3