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:
Jerome Charaoui
2016-12-06 22:17:44 -05:00
committed by Jeremy Benoist
parent 2a0eec07a5
commit 7aba665e48
11 changed files with 30 additions and 32 deletions

View File

@ -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;
}