summaryrefslogtreecommitdiff
path: root/src/HTML5.php
diff options
context:
space:
mode:
authorTitouan Galopin <[email protected]>2018-10-22 23:49:05 +0200
committerTitouan Galopin <[email protected]>2018-11-02 21:44:20 +0100
commit80b8e9177f587365535e9dd6bff45addad9c2bb1 (patch)
tree7083457d7e3a48a8b2b74f31b59313eea1ca7f45 /src/HTML5.php
parentfb50d43c6c640683d78651535ba46c06e452c628 (diff)
Add more extensions on composer.json, improve phpdocs and remove dead code
Diffstat (limited to 'src/HTML5.php')
-rw-r--r--src/HTML5.php17
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);