summaryrefslogtreecommitdiff
path: root/src/HTMLParser.php
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2016-10-18 16:13:19 +0000
committerStyleCI Bot <[email protected]>2016-10-18 16:13:19 +0000
commitee754d5a7b184fb66ad57b660fdcbdf691f29bce (patch)
tree97ac8dccd32a69054a9c5f937afdc02ef3723dc4 /src/HTMLParser.php
parentd75e04143ccd1d68a0e02bc074aec28fc0d67806 (diff)
Applied fixes from StyleCI
Diffstat (limited to 'src/HTMLParser.php')
-rw-r--r--src/HTMLParser.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php
index c4d102c..c396043 100644
--- a/src/HTMLParser.php
+++ b/src/HTMLParser.php
@@ -5,10 +5,9 @@ namespace andreskrey\Readability;
use DOMDocument;
/**
- * Class HTMLParser
+ * Class HTMLParser.
*
* A helper class to parse HTML and get a Readability object.
- *
*/
class HTMLParser
{
@@ -46,12 +45,11 @@ class HTMLParser
'nextLink' => '/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i',
'prevLink' => '/(prev|earl|old|new|<|«)/i',
'whitespace' => '/^\s*$/',
- 'hasContent' => '/\S$/'
+ 'hasContent' => '/\S$/',
];
/**
- * Constructor
- *
+ * Constructor.
*/
public function __construct()
{
@@ -62,7 +60,7 @@ class HTMLParser
}
/**
- * Parse the html. This is the main entry point of the HTMLParser
+ * Parse the html. This is the main entry point of the HTMLParser.
*
* @param string $html Full html of the website, page, etc.
*
@@ -116,7 +114,7 @@ class HTMLParser
}
/**
- * Tries to guess relevant info from metadata of the html
+ * Tries to guess relevant info from metadata of the html.
*
* @return array Metadata info. May have title, excerpt and or byline.
*/
@@ -124,7 +122,7 @@ class HTMLParser
{
$metadata = [];
foreach ($this->dom->getElementsByTagName('meta') as $meta) {
- /** @var DOMElement $meta */
+ /* @var DOMElement $meta */
$name = $meta->getAttribute('name');
$property = $meta->getAttribute('property');
@@ -241,7 +239,6 @@ class HTMLParser
$readability = new Readability($ancestor);
$candidates[] = $readability->initializeNode();
}
-
}
}
}