diff options
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | src/Nodes/NodeTrait.php | 1 | ||||
-rw-r--r-- | src/Readability.php | 2 | ||||
-rw-r--r-- | test/ConfigurationTest.php | 3 |
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() { |