summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2018-03-19 13:29:01 +0000
committerAndres Rey <[email protected]>2018-03-19 13:29:01 +0000
commita7b5fa260676c213d456b6a077b17dc52fcdbe0c (patch)
tree4dc06a87abdb7f354f21498750df1f780764346e
parentafb9c808db0ff0ad6a9f5e08dd9e3bac97cfd7fa (diff)
Apply StyleCI diff
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/Nodes/NodeTrait.php1
-rw-r--r--src/Readability.php2
-rw-r--r--test/ConfigurationTest.php3
4 files changed, 3 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8164da6..708342d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,7 +13,7 @@ All notable changes to this project will be documented in this file.
## [v1.1.1](https://github.com/andreskrey/readability.php/releases/tag/v1.1.1)
-- Switched from assertEquals to assertSame on unit testing to avoid weak comparisons.
+- Switched from assertEquals to assertSame on unit testing to avoid weak comparisons.
- Added a safe check to avoid sending the DOMDocument as a node when scanning for node ancestors.
- Fix issue #45: Small mistake in documentation
- Fix issue #46: Added `data-src` as a image source path
diff --git a/src/Nodes/NodeTrait.php b/src/Nodes/NodeTrait.php
index bb848ab..13611c9 100644
--- a/src/Nodes/NodeTrait.php
+++ b/src/Nodes/NodeTrait.php
@@ -7,7 +7,6 @@ use andreskrey\Readability\Nodes\DOM\DOMElement;
use andreskrey\Readability\Nodes\DOM\DOMNode;
use andreskrey\Readability\Nodes\DOM\DOMText;
-
/**
* @method \DOMNode removeAttribute($name)
*/
diff --git a/src/Readability.php b/src/Readability.php
index 4123c55..93fc810 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -497,7 +497,7 @@ class Readability
if (count(preg_split('/\s+/', $curTitle)) < 3) {
$curTitle = substr($originalTitle, strpos($originalTitle, ':') + 1);
$this->logger->info(sprintf('[Metadata] Title too short, using the first part of the title instead: \'%s\'', $curTitle));
- } else if (count(preg_split('/\s+/', substr($curTitle, 0, strpos($curTitle, ':')))) > 5) {
+ } elseif (count(preg_split('/\s+/', substr($curTitle, 0, strpos($curTitle, ':')))) > 5) {
// But if we have too many words before the colon there's something weird
// with the titles and the H tags so let's just use the original title instead
$curTitle = $originalTitle;
diff --git a/test/ConfigurationTest.php b/test/ConfigurationTest.php
index ed56cb2..19db2f1 100644
--- a/test/ConfigurationTest.php
+++ b/test/ConfigurationTest.php
@@ -52,7 +52,6 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($options['summonCthulhu'], $config->getOriginalURL());
}
-
/**
* @return array
*/
@@ -77,7 +76,7 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
}
/**
- * Test if a logger interface can be injected and retrieved from the Configuration object
+ * Test if a logger interface can be injected and retrieved from the Configuration object.
*/
public function testLoggerCanBeInjected()
{