X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FApiBundle%2FController%2FEntryRestController.php;h=0b4e74a0f1d69d332d710300d2471a69132a6d24;hb=2a1ceb67b4400f46f4d3067e887ff54aa906f0a2;hp=fc47c479ff4bc0df926c2acde344e239eb0e7366;hpb=685a5d745e2b723a09111d7d31157cced67ea9b4;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index fc47c479..0b4e74a0 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php @@ -102,7 +102,7 @@ class EntryRestController extends WallabagRestController $order = $request->query->get('order', 'desc'); $page = (int) $request->query->get('page', 1); $perPage = (int) $request->query->get('perPage', 30); - $tags = is_array($request->query->get('tags')) ? '' : (string) $request->query->get('tags', ''); + $tags = \is_array($request->query->get('tags')) ? '' : (string) $request->query->get('tags', ''); $since = $request->query->get('since', 0); /** @var \Pagerfanta\Pagerfanta $pager */ @@ -253,7 +253,7 @@ class EntryRestController extends WallabagRestController $limit = $this->container->getParameter('wallabag_core.api_limit_mass_actions'); - if (count($urls) > $limit) { + if (\count($urls) > $limit) { throw new HttpException(400, 'API limit reached'); } @@ -347,7 +347,7 @@ class EntryRestController extends WallabagRestController 'open_graph' => [ 'og_image' => !empty($data['picture']) ? $data['picture'] : $entry->getPreviewPicture(), ], - 'authors' => is_string($data['authors']) ? explode(',', $data['authors']) : $entry->getPublishedBy(), + 'authors' => \is_string($data['authors']) ? explode(',', $data['authors']) : $entry->getPublishedBy(), ] ); } catch (\Exception $e) { @@ -461,7 +461,7 @@ class EntryRestController extends WallabagRestController $contentProxy->updateLanguage($entry, $data['language']); } - if (!empty($data['authors']) && is_string($data['authors'])) { + if (!empty($data['authors']) && \is_string($data['authors'])) { $entry->setPublishedBy(explode(',', $data['authors'])); }