aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/AbstractImport.php
diff options
context:
space:
mode:
authorJerome Charaoui <jerome@riseup.net>2016-12-06 22:17:44 -0500
committerJeremy Benoist <jbenoist@20minutes.fr>2017-06-01 09:43:01 +0200
commit7aba665e484c5c36ee029219a999a427d864ff22 (patch)
tree9ac57748d91cee32848b5e961e293e1c9a1fa61f /src/Wallabag/ImportBundle/Import/AbstractImport.php
parent2a0eec07a5630401a9ceb7add65604f79238f10c (diff)
downloadwallabag-7aba665e484c5c36ee029219a999a427d864ff22.tar.gz
wallabag-7aba665e484c5c36ee029219a999a427d864ff22.tar.zst
wallabag-7aba665e484c5c36ee029219a999a427d864ff22.zip
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.
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/AbstractImport.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/AbstractImport.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Wallabag/ImportBundle/Import/AbstractImport.php b/src/Wallabag/ImportBundle/Import/AbstractImport.php
index a61388c0..fc462c4c 100644
--- a/src/Wallabag/ImportBundle/Import/AbstractImport.php
+++ b/src/Wallabag/ImportBundle/Import/AbstractImport.php
@@ -91,13 +91,11 @@ abstract class AbstractImport implements ImportInterface
91 * @param Entry $entry Entry to update 91 * @param Entry $entry Entry to update
92 * @param string $url Url to grab content for 92 * @param string $url Url to grab content for
93 * @param array $content An array with AT LEAST keys title, html, url, language & content_type to skip the fetchContent from the url 93 * @param array $content An array with AT LEAST keys title, html, url, language & content_type to skip the fetchContent from the url
94 *
95 * @return Entry
96 */ 94 */
97 protected function fetchContent(Entry $entry, $url, array $content = []) 95 protected function fetchContent(Entry $entry, $url, array $content = [])
98 { 96 {
99 try { 97 try {
100 return $this->contentProxy->updateEntry($entry, $url, $content); 98 $this->contentProxy->updateEntry($entry, $url, $content);
101 } catch (\Exception $e) { 99 } catch (\Exception $e) {
102 return $entry; 100 return $entry;
103 } 101 }