From 2a1ceb67b4400f46f4d3067e887ff54aa906f0a2 Mon Sep 17 00:00:00 2001 From: Kevin Decherf Date: Wed, 5 Sep 2018 14:25:32 +0200 Subject: php-cs-fixer Signed-off-by: Kevin Decherf --- src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php | 8 ++++---- src/Wallabag/CoreBundle/Command/ExportCommand.php | 2 +- src/Wallabag/CoreBundle/Command/InstallCommand.php | 8 ++++---- src/Wallabag/CoreBundle/Command/ListUserCommand.php | 2 +- src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/Wallabag/CoreBundle/Command') diff --git a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php index b58909db..99170967 100644 --- a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php +++ b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php @@ -51,7 +51,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand } else { $users = $this->getContainer()->get('wallabag_user.user_repository')->findAll(); - $this->io->text(sprintf('Cleaning through %d user accounts', count($users))); + $this->io->text(sprintf('Cleaning through %d user accounts', \count($users))); foreach ($users as $user) { $this->io->text(sprintf('Processing user %s', $user->getUsername())); @@ -79,7 +79,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand $url = $this->similarUrl($entry['url']); /* @var $entry Entry */ - if (in_array($url, $urls, true)) { + if (\in_array($url, $urls, true)) { ++$duplicatesCount; $em->remove($repo->find($entry['id'])); @@ -96,8 +96,8 @@ class CleanDuplicatesCommand extends ContainerAwareCommand private function similarUrl($url) { - if (in_array(substr($url, -1), ['/', '#'], true)) { // get rid of "/" and "#" and the end of urls - return substr($url, 0, strlen($url)); + if (\in_array(substr($url, -1), ['/', '#'], true)) { // get rid of "/" and "#" and the end of urls + return substr($url, 0, \strlen($url)); } return $url; diff --git a/src/Wallabag/CoreBundle/Command/ExportCommand.php b/src/Wallabag/CoreBundle/Command/ExportCommand.php index 75e9ad91..128f9d65 100644 --- a/src/Wallabag/CoreBundle/Command/ExportCommand.php +++ b/src/Wallabag/CoreBundle/Command/ExportCommand.php @@ -47,7 +47,7 @@ class ExportCommand extends ContainerAwareCommand ->getQuery() ->getResult(); - $io->text(sprintf('Exporting %d entrie(s) for user %s...', count($entries), $user->getUserName())); + $io->text(sprintf('Exporting %d entrie(s) for user %s...', \count($entries), $user->getUserName())); $filePath = $input->getArgument('filepath'); diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index a56a3257..3c76545c 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php @@ -81,7 +81,7 @@ class InstallCommand extends ContainerAwareCommand $status = 'OK!'; $help = ''; - if (!extension_loaded($this->getContainer()->getParameter('database_driver'))) { + if (!\extension_loaded($this->getContainer()->getParameter('database_driver'))) { $fulfilled = false; $status = 'ERROR!'; $help = 'Database driver "' . $this->getContainer()->getParameter('database_driver') . '" is not installed.'; @@ -146,7 +146,7 @@ class InstallCommand extends ContainerAwareCommand $status = 'OK!'; $help = ''; - if (!function_exists($functionRequired)) { + if (!\function_exists($functionRequired)) { $fulfilled = false; $status = 'ERROR!'; $help = 'You need the ' . $functionRequired . ' function activated'; @@ -371,7 +371,7 @@ class InstallCommand extends ContainerAwareCommand } try { - return in_array($databaseName, $schemaManager->listDatabases(), true); + return \in_array($databaseName, $schemaManager->listDatabases(), true); } catch (\Doctrine\DBAL\Exception\DriverException $e) { // it means we weren't able to get database list, assume the database doesn't exist @@ -389,6 +389,6 @@ class InstallCommand extends ContainerAwareCommand { $schemaManager = $this->getContainer()->get('doctrine')->getManager()->getConnection()->getSchemaManager(); - return count($schemaManager->listTableNames()) > 0 ? true : false; + return \count($schemaManager->listTableNames()) > 0 ? true : false; } } diff --git a/src/Wallabag/CoreBundle/Command/ListUserCommand.php b/src/Wallabag/CoreBundle/Command/ListUserCommand.php index 68e515da..a7101a02 100644 --- a/src/Wallabag/CoreBundle/Command/ListUserCommand.php +++ b/src/Wallabag/CoreBundle/Command/ListUserCommand.php @@ -50,7 +50,7 @@ class ListUserCommand extends ContainerAwareCommand $io->success( sprintf( '%s/%s%s user(s) displayed.', - count($users), + \count($users), $nbUsers, null === $input->getArgument('search') ? '' : ' (filtered)' ) diff --git a/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php b/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php index 91998841..10918872 100644 --- a/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php +++ b/src/Wallabag/CoreBundle/Command/ReloadEntryCommand.php @@ -43,7 +43,7 @@ class ReloadEntryCommand extends ContainerAwareCommand $entryRepository = $this->getContainer()->get('wallabag_core.entry_repository'); $entryIds = $entryRepository->findAllEntriesIdByUserId($userId); - $nbEntries = count($entryIds); + $nbEntries = \count($entryIds); if (!$nbEntries) { $io->success('No entry to reload.'); -- cgit v1.2.3