Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

Commit

Permalink
Apply StyleCI diff
Browse files Browse the repository at this point in the history
  • Loading branch information
andreskrey committed Mar 19, 2018
1 parent afb9c80 commit a7b5fa2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/Nodes/NodeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use andreskrey\Readability\Nodes\DOM\DOMNode;
use andreskrey\Readability\Nodes\DOM\DOMText;


/**
* @method \DOMNode removeAttribute($name)
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Readability.php
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ private function getArticleTitle()
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;
Expand Down
3 changes: 1 addition & 2 deletions test/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ private function doEqualsAsserts(Configuration $config, array $options)
$this->assertEquals($options['summonCthulhu'], $config->getOriginalURL());
}


/**
* @return array
*/
Expand All @@ -77,7 +76,7 @@ public function getParams()
}

/**
* 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()
{
Expand Down

0 comments on commit a7b5fa2

Please sign in to comment.