diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-05-29 12:00:23 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2019-05-29 12:50:44 +0200 |
commit | 52e8d93248c6f47ccb98abc973fcd230b29fee6c (patch) | |
tree | 297e753bf38491cdce4360372ce298ab8060f3b6 | |
parent | e9579d6de9ea99522e5905e8bb827e858c8da1fc (diff) | |
download | wallabag-52e8d93248c6f47ccb98abc973fcd230b29fee6c.tar.gz wallabag-52e8d93248c6f47ccb98abc973fcd230b29fee6c.tar.zst wallabag-52e8d93248c6f47ccb98abc973fcd230b29fee6c.zip |
Fix some Scrutinizer issues
5 files changed, 7 insertions, 7 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/EntryRestController.php b/src/Wallabag/ApiBundle/Controller/EntryRestController.php index aaacdcdc..9f933adb 100644 --- a/src/Wallabag/ApiBundle/Controller/EntryRestController.php +++ b/src/Wallabag/ApiBundle/Controller/EntryRestController.php | |||
@@ -564,7 +564,7 @@ class EntryRestController extends WallabagRestController | |||
564 | } | 564 | } |
565 | 565 | ||
566 | // if refreshing entry failed, don't save it | 566 | // if refreshing entry failed, don't save it |
567 | if ($this->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) { | 567 | if ($this->container->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) { |
568 | return new JsonResponse([], 304); | 568 | return new JsonResponse([], 304); |
569 | } | 569 | } |
570 | 570 | ||
diff --git a/src/Wallabag/ApiBundle/Controller/UserRestController.php b/src/Wallabag/ApiBundle/Controller/UserRestController.php index 3a4dafcd..1b10a076 100644 --- a/src/Wallabag/ApiBundle/Controller/UserRestController.php +++ b/src/Wallabag/ApiBundle/Controller/UserRestController.php | |||
@@ -45,7 +45,7 @@ class UserRestController extends WallabagRestController | |||
45 | */ | 45 | */ |
46 | public function putUserAction(Request $request) | 46 | public function putUserAction(Request $request) |
47 | { | 47 | { |
48 | if (!$this->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) { | 48 | if (!$this->container->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) { |
49 | $json = $this->get('jms_serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json'); | 49 | $json = $this->get('jms_serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json'); |
50 | 50 | ||
51 | return (new JsonResponse()) | 51 | return (new JsonResponse()) |
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index f18b0910..44fd9683 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |||
@@ -2,13 +2,13 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ApiBundle\Controller; | 3 | namespace Wallabag\ApiBundle\Controller; |
4 | 4 | ||
5 | use FOS\RestBundle\Controller\FOSRestController; | 5 | use FOS\RestBundle\Controller\AbstractFOSRestController; |
6 | use JMS\Serializer\SerializationContext; | 6 | use JMS\Serializer\SerializationContext; |
7 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; | 7 | use Nelmio\ApiDocBundle\Annotation\ApiDoc; |
8 | use Symfony\Component\HttpFoundation\JsonResponse; | 8 | use Symfony\Component\HttpFoundation\JsonResponse; |
9 | use Symfony\Component\Security\Core\Exception\AccessDeniedException; | 9 | use Symfony\Component\Security\Core\Exception\AccessDeniedException; |
10 | 10 | ||
11 | class WallabagRestController extends FOSRestController | 11 | class WallabagRestController extends AbstractFOSRestController |
12 | { | 12 | { |
13 | /** | 13 | /** |
14 | * Retrieve version number. | 14 | * Retrieve version number. |
diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 1b4367fd..8637c62f 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php | |||
@@ -771,7 +771,7 @@ class Entry | |||
771 | } | 771 | } |
772 | 772 | ||
773 | /** | 773 | /** |
774 | * @return string | 774 | * @return string|null |
775 | */ | 775 | */ |
776 | public function getUid() | 776 | public function getUid() |
777 | { | 777 | { |
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 880e7c65..f9cf5233 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -345,7 +345,7 @@ class EntryRepository extends EntityRepository | |||
345 | * @param string $url | 345 | * @param string $url |
346 | * @param int $userId | 346 | * @param int $userId |
347 | * | 347 | * |
348 | * @return Entry|bool | 348 | * @return Entry|false |
349 | */ | 349 | */ |
350 | public function findByUrlAndUserId($url, $userId) | 350 | public function findByUrlAndUserId($url, $userId) |
351 | { | 351 | { |
@@ -362,7 +362,7 @@ class EntryRepository extends EntityRepository | |||
362 | * @param string $hashedUrl Url hashed using sha1 | 362 | * @param string $hashedUrl Url hashed using sha1 |
363 | * @param int $userId | 363 | * @param int $userId |
364 | * | 364 | * |
365 | * @return Entry|bool | 365 | * @return Entry|false |
366 | */ | 366 | */ |
367 | public function findByHashedUrlAndUserId($hashedUrl, $userId) | 367 | public function findByHashedUrlAndUserId($hashedUrl, $userId) |
368 | { | 368 | { |