forked from wallabag/wallabag
Avoid returning objects passed by reference.
Objects are always passed by reference, so it doesn't make sense to return an object which is passed by reference as it will always be the same object. This change makes the code a bit more readable.
This commit is contained in:
committed by
Jeremy Benoist
parent
2a0eec07a5
commit
7aba665e48
@ -91,13 +91,11 @@ abstract class AbstractImport implements ImportInterface
|
||||
* @param Entry $entry Entry to update
|
||||
* @param string $url Url to grab content for
|
||||
* @param array $content An array with AT LEAST keys title, html, url, language & content_type to skip the fetchContent from the url
|
||||
*
|
||||
* @return Entry
|
||||
*/
|
||||
protected function fetchContent(Entry $entry, $url, array $content = [])
|
||||
{
|
||||
try {
|
||||
return $this->contentProxy->updateEntry($entry, $url, $content);
|
||||
$this->contentProxy->updateEntry($entry, $url, $content);
|
||||
} catch (\Exception $e) {
|
||||
return $entry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user