mirror of
https://github.com/wallabag/wallabag.git
synced 2024-10-31 22:28:54 +00:00
Fix some Scrutinizer issues
This commit is contained in:
parent
e9579d6de9
commit
52e8d93248
5 changed files with 7 additions and 7 deletions
|
@ -564,7 +564,7 @@ class EntryRestController extends WallabagRestController
|
|||
}
|
||||
|
||||
// if refreshing entry failed, don't save it
|
||||
if ($this->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) {
|
||||
if ($this->container->getParameter('wallabag_core.fetching_error_message') === $entry->getContent()) {
|
||||
return new JsonResponse([], 304);
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class UserRestController extends WallabagRestController
|
|||
*/
|
||||
public function putUserAction(Request $request)
|
||||
{
|
||||
if (!$this->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) {
|
||||
if (!$this->container->getParameter('fosuser_registration') || !$this->get('craue_config')->get('api_user_registration')) {
|
||||
$json = $this->get('jms_serializer')->serialize(['error' => "Server doesn't allow registrations"], 'json');
|
||||
|
||||
return (new JsonResponse())
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
namespace Wallabag\ApiBundle\Controller;
|
||||
|
||||
use FOS\RestBundle\Controller\FOSRestController;
|
||||
use FOS\RestBundle\Controller\AbstractFOSRestController;
|
||||
use JMS\Serializer\SerializationContext;
|
||||
use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
|
||||
|
||||
class WallabagRestController extends FOSRestController
|
||||
class WallabagRestController extends AbstractFOSRestController
|
||||
{
|
||||
/**
|
||||
* Retrieve version number.
|
||||
|
|
|
@ -771,7 +771,7 @@ class Entry
|
|||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUid()
|
||||
{
|
||||
|
|
|
@ -345,7 +345,7 @@ class EntryRepository extends EntityRepository
|
|||
* @param string $url
|
||||
* @param int $userId
|
||||
*
|
||||
* @return Entry|bool
|
||||
* @return Entry|false
|
||||
*/
|
||||
public function findByUrlAndUserId($url, $userId)
|
||||
{
|
||||
|
@ -362,7 +362,7 @@ class EntryRepository extends EntityRepository
|
|||
* @param string $hashedUrl Url hashed using sha1
|
||||
* @param int $userId
|
||||
*
|
||||
* @return Entry|bool
|
||||
* @return Entry|false
|
||||
*/
|
||||
public function findByHashedUrlAndUserId($hashedUrl, $userId)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue