aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller/EntryRestController.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller/EntryRestController.php')
-rw-r--r--src/Wallabag/ApiBundle/Controller/EntryRestController.php8
1 files changed, 4 insertions, 4 deletions
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
102 $order = $request->query->get('order', 'desc'); 102 $order = $request->query->get('order', 'desc');
103 $page = (int) $request->query->get('page', 1); 103 $page = (int) $request->query->get('page', 1);
104 $perPage = (int) $request->query->get('perPage', 30); 104 $perPage = (int) $request->query->get('perPage', 30);
105 $tags = is_array($request->query->get('tags')) ? '' : (string) $request->query->get('tags', ''); 105 $tags = \is_array($request->query->get('tags')) ? '' : (string) $request->query->get('tags', '');
106 $since = $request->query->get('since', 0); 106 $since = $request->query->get('since', 0);
107 107
108 /** @var \Pagerfanta\Pagerfanta $pager */ 108 /** @var \Pagerfanta\Pagerfanta $pager */
@@ -253,7 +253,7 @@ class EntryRestController extends WallabagRestController
253 253
254 $limit = $this->container->getParameter('wallabag_core.api_limit_mass_actions'); 254 $limit = $this->container->getParameter('wallabag_core.api_limit_mass_actions');
255 255
256 if (count($urls) > $limit) { 256 if (\count($urls) > $limit) {
257 throw new HttpException(400, 'API limit reached'); 257 throw new HttpException(400, 'API limit reached');
258 } 258 }
259 259
@@ -347,7 +347,7 @@ class EntryRestController extends WallabagRestController
347 'open_graph' => [ 347 'open_graph' => [
348 'og_image' => !empty($data['picture']) ? $data['picture'] : $entry->getPreviewPicture(), 348 'og_image' => !empty($data['picture']) ? $data['picture'] : $entry->getPreviewPicture(),
349 ], 349 ],
350 'authors' => is_string($data['authors']) ? explode(',', $data['authors']) : $entry->getPublishedBy(), 350 'authors' => \is_string($data['authors']) ? explode(',', $data['authors']) : $entry->getPublishedBy(),
351 ] 351 ]
352 ); 352 );
353 } catch (\Exception $e) { 353 } catch (\Exception $e) {
@@ -461,7 +461,7 @@ class EntryRestController extends WallabagRestController
461 $contentProxy->updateLanguage($entry, $data['language']); 461 $contentProxy->updateLanguage($entry, $data['language']);
462 } 462 }
463 463
464 if (!empty($data['authors']) && is_string($data['authors'])) { 464 if (!empty($data['authors']) && \is_string($data['authors'])) {
465 $entry->setPublishedBy(explode(',', $data['authors'])); 465 $entry->setPublishedBy(explode(',', $data['authors']));
466 } 466 }
467 467