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

@ -315,7 +315,7 @@ class EntryRestController extends WallabagRestController
}
try {
$entry = $this->get('wallabag_core.content_proxy')->updateEntry(
$this->get('wallabag_core.content_proxy')->updateEntry(
$entry,
$url,
[
@ -428,7 +428,7 @@ class EntryRestController extends WallabagRestController
$this->validateUserAccess($entry->getUser()->getId());
try {
$entry = $this->get('wallabag_core.content_proxy')->updateEntry($entry, $entry->getUrl());
$this->get('wallabag_core.content_proxy')->updateEntry($entry, $entry->getUrl());
} catch (\Exception $e) {
$this->get('logger')->error('Error while saving an entry', [
'exception' => $e,