summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2017-03-10 10:54:32 +0000
committerStyleCI Bot <[email protected]>2017-03-10 10:54:32 +0000
commit52b15698db988be358bc36bcca3ac8facd6003e2 (patch)
treef5bb723beb912776e0308b776405a4f71a06c9d5
parentf57d028a5d808fd0ab88588ca3247c927ec27323 (diff)
Apply fixes from StyleCI
-rw-r--r--src/HTMLParser.php3
-rw-r--r--src/Readability.php12
-rw-r--r--test/HTMLParserTest.php2
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) {