diff options
author | Andres Rey <[email protected]> | 2017-03-10 10:55:19 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2017-03-10 10:55:19 +0000 |
commit | d2337b3b89964dbca0321738d4c3161d5213b797 (patch) | |
tree | f5bb723beb912776e0308b776405a4f71a06c9d5 | |
parent | f57d028a5d808fd0ab88588ca3247c927ec27323 (diff) | |
parent | 52b15698db988be358bc36bcca3ac8facd6003e2 (diff) |
Merge pull request #17 from andreskrey/analysis-zDANGl
Apply fixes from StyleCI
-rw-r--r-- | src/HTMLParser.php | 3 | ||||
-rw-r--r-- | src/Readability.php | 12 | ||||
-rw-r--r-- | test/HTMLParserTest.php | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php index 0b407ae..3226904 100644 --- a/src/HTMLParser.php +++ b/src/HTMLParser.php @@ -533,6 +533,7 @@ class HTMLParser * Gets nodes from the root element. * * @param $node Readability + * * @return array */ private function getNodes(Readability $node) @@ -1106,7 +1107,7 @@ class HTMLParser * Checks if the node is a byline. * * @param Readability $node - * @param string $matchString + * @param string $matchString * * @return bool */ diff --git a/src/Readability.php b/src/Readability.php index 44633b2..c55e0ad 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -253,7 +253,7 @@ class Readability extends Element implements ReadabilityInterface { // Check if the setAttribute method exists, as some elements lack of it (and calling it anyway throws an exception) if (method_exists($this->node, 'setAttribute')) { - $this->contentScore = (float)$score; + $this->contentScore = (float) $score; // Set score in an attribute of the tag to prevent losing it while creating new Readability objects. $this->node->setAttribute('data-readability', $this->contentScore); @@ -286,7 +286,7 @@ class Readability extends Element implements ReadabilityInterface * element with the new tag name and importing it to the main DOMDocument. * * @param string $value - * @param bool $importAttributes + * @param bool $importAttributes */ public function setNodeTag($value, $importAttributes = false) { @@ -343,7 +343,7 @@ class Readability extends Element implements ReadabilityInterface * for parents. * * @param Readability $originalNode - * @param bool $ignoreSelfAndKids + * @param bool $ignoreSelfAndKids * * @return Readability */ @@ -419,7 +419,7 @@ class Readability extends Element implements ReadabilityInterface * Creates a new node based on the text content of the original node. * * @param Readability $originalNode - * @param string $tagName + * @param string $tagName * * @return Readability */ @@ -466,8 +466,8 @@ class Readability extends Element implements ReadabilityInterface * provided one. * * @param Readability $node - * @param string $tagName - * @param int $maxDepth + * @param string $tagName + * @param int $maxDepth * * @return bool */ diff --git a/test/HTMLParserTest.php b/test/HTMLParserTest.php index 673a1d5..9d7586e 100644 --- a/test/HTMLParserTest.php +++ b/test/HTMLParserTest.php @@ -13,7 +13,7 @@ class HTMLParserTest extends \PHPUnit_Framework_TestCase { $options = ['originalURL' => 'http://fakehost/test/test.html', 'fixRelativeURLs' => true, - 'substituteEntities' => true + 'substituteEntities' => true, ]; if ($config) { |