From de5b138a5907dad9a46779aafe1db047f0053c7f Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 13 Dec 2022 10:26:51 +0100 Subject: [PATCH] Fix CS --- src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php | 2 +- src/Wallabag/CoreBundle/Entity/Config.php | 4 ++-- src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php | 2 +- src/Wallabag/CoreBundle/Event/EntrySavedEvent.php | 2 +- src/Wallabag/CoreBundle/Helper/DownloadImages.php | 2 +- src/Wallabag/CoreBundle/Helper/TagsAssigner.php | 2 +- src/Wallabag/CoreBundle/Repository/EntryRepository.php | 2 +- src/Wallabag/ImportBundle/Import/PocketImport.php | 2 +- tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php b/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php index 37e4d6e17..b54784408 100644 --- a/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php +++ b/src/Wallabag/CoreBundle/Doctrine/WallabagMigration.php @@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; abstract class WallabagMigration extends AbstractMigration implements ContainerAwareInterface { - const UN_ESCAPED_TABLE = true; + public const UN_ESCAPED_TABLE = true; /** * @var ContainerInterface diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php index 45ce69e73..9b47c23a8 100644 --- a/src/Wallabag/CoreBundle/Entity/Config.php +++ b/src/Wallabag/CoreBundle/Entity/Config.php @@ -21,8 +21,8 @@ use Wallabag\UserBundle\Entity\User; */ class Config { - const REDIRECT_TO_HOMEPAGE = 0; - const REDIRECT_TO_CURRENT_PAGE = 1; + public const REDIRECT_TO_HOMEPAGE = 0; + public const REDIRECT_TO_CURRENT_PAGE = 1; /** * @var int diff --git a/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php b/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php index e9061d044..960e99a1a 100644 --- a/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php +++ b/src/Wallabag/CoreBundle/Event/EntryDeletedEvent.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Entity\Entry; */ class EntryDeletedEvent extends Event { - const NAME = 'entry.deleted'; + public const NAME = 'entry.deleted'; protected $entry; diff --git a/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php b/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php index 5fdb52212..5d5815f68 100644 --- a/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php +++ b/src/Wallabag/CoreBundle/Event/EntrySavedEvent.php @@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Entity\Entry; */ class EntrySavedEvent extends Event { - const NAME = 'entry.saved'; + public const NAME = 'entry.saved'; protected $entry; diff --git a/src/Wallabag/CoreBundle/Helper/DownloadImages.php b/src/Wallabag/CoreBundle/Helper/DownloadImages.php index 970f5522d..9aa549862 100644 --- a/src/Wallabag/CoreBundle/Helper/DownloadImages.php +++ b/src/Wallabag/CoreBundle/Helper/DownloadImages.php @@ -19,7 +19,7 @@ use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeExtensionGuesser; class DownloadImages { - const REGENERATE_PICTURES_QUALITY = 80; + public const REGENERATE_PICTURES_QUALITY = 80; private $client; private $baseFolder; diff --git a/src/Wallabag/CoreBundle/Helper/TagsAssigner.php b/src/Wallabag/CoreBundle/Helper/TagsAssigner.php index 0b4e1e29f..203e9bcc7 100644 --- a/src/Wallabag/CoreBundle/Helper/TagsAssigner.php +++ b/src/Wallabag/CoreBundle/Helper/TagsAssigner.php @@ -47,7 +47,7 @@ class TagsAssigner $label = trim(mb_convert_case($label, \MB_CASE_LOWER)); // avoid empty tag - if (0 === \strlen($label)) { + if ('' === $label) { continue; } diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index a5d5fed5a..9dded5e57 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -383,7 +383,7 @@ class EntryRepository extends ServiceEntityRepository * Remove tags from all user entries. * * @param int $userId - * @param Array $tags + * @param array $tags */ public function removeTags($userId, $tags) { diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index 03103a193..caeeaabb0 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php @@ -14,7 +14,7 @@ use Wallabag\CoreBundle\Entity\Entry; class PocketImport extends AbstractImport { - const NB_ELEMENTS = 5000; + public const NB_ELEMENTS = 5000; /** * @var HttpMethodsClient */ diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index f3cbdfd95..0d64ca1e9 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -17,7 +17,7 @@ use Wallabag\UserBundle\Entity\User; class EntryControllerTest extends WallabagCoreTestCase { - const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'https://www.lemonde.fr/judo/article/2017/11/11/judo-la-decima-de-teddy-riner_5213605_1556020.html'; + public const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'https://www.lemonde.fr/judo/article/2017/11/11/judo-la-decima-de-teddy-riner_5213605_1556020.html'; public $downloadImagesEnabled = false; public $url = 'https://www.lemonde.fr/pixels/article/2019/06/18/ce-qu-il-faut-savoir-sur-le-libra-la-cryptomonnaie-de-facebook_5477887_4408996.html'; private $entryDataTestAttribute = '[data-test="entry"]';