From 9e0fff7cb09879d7545db5d4a15da86426b8a19a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Thu, 5 Feb 2015 18:19:34 +0100 Subject: simplify code --- src/Wallabag/CoreBundle/Controller/WallabagRestController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Controller') diff --git a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php index eb19f0f5..abbf5437 100644 --- a/src/Wallabag/CoreBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/CoreBundle/Controller/WallabagRestController.php @@ -87,7 +87,7 @@ class WallabagRestController extends Controller $entry = new Entries(); $entry->setUserId(1); $entry->setUrl($url); - $entry->setTitle(!is_null($request->request->get('title')) ? $request->request->get('title') : $content->getTitle()); + $entry->setTitle($request->request->get('title') ?: $content->getTitle()); $entry->setContent($content->getBody()); $em = $this->getDoctrine()->getManager(); $em->persist($entry); -- cgit v1.2.3