X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FCommand%2FCleanDuplicatesCommand.php;h=99170967018af889b1cf1e13d5beb5cb110308c5;hb=2a1ceb67b4400f46f4d3067e887ff54aa906f0a2;hp=b58909db9f9c40b8c6cadbbdf25f27d7a8240a86;hpb=685a5d745e2b723a09111d7d31157cced67ea9b4;p=github%2Fwallabag%2Fwallabag.git 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;