diff options
author | Jerome Charaoui <jerome@riseup.net> | 2016-12-06 22:17:44 -0500 |
---|---|---|
committer | Jeremy Benoist <jbenoist@20minutes.fr> | 2017-06-01 09:43:01 +0200 |
commit | 7aba665e484c5c36ee029219a999a427d864ff22 (patch) | |
tree | 9ac57748d91cee32848b5e961e293e1c9a1fa61f /src/Wallabag/ApiBundle/Controller/EntryRestController.php | |
parent | 2a0eec07a5630401a9ceb7add65604f79238f10c (diff) | |
download | wallabag-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/ApiBundle/Controller/EntryRestController.php')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/EntryRestController.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index c3ba1858..d154c18b 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php | |||
@@ -315,7 +315,7 @@ class EntryRestController extends WallabagRestController | |||
315 | } | 315 | } |
316 | 316 | ||
317 | try { | 317 | try { |
318 | $entry = $this->get('wallabag_core.content_proxy')->updateEntry( | 318 | $this->get('wallabag_core.content_proxy')->updateEntry( |
319 | $entry, | 319 | $entry, |
320 | $url, | 320 | $url, |
321 | [ | 321 | [ |
@@ -428,7 +428,7 @@ class EntryRestController extends WallabagRestController | |||
428 | $this->validateUserAccess($entry->getUser()->getId()); | 428 | $this->validateUserAccess($entry->getUser()->getId()); |
429 | 429 | ||
430 | try { | 430 | try { |
431 | $entry = $this->get('wallabag_core.content_proxy')->updateEntry($entry, $entry->getUrl()); | 431 | $this->get('wallabag_core.content_proxy')->updateEntry($entry, $entry->getUrl()); |
432 | } catch (\Exception $e) { | 432 | } catch (\Exception $e) { |
433 | $this->get('logger')->error('Error while saving an entry', [ | 433 | $this->get('logger')->error('Error while saving an entry', [ |
434 | 'exception' => $e, | 434 | 'exception' => $e, |