aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2017-07-01 09:52:38 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-07-01 09:52:38 +0200
commitf808b01692a835673f328d7221ba8c212caa9b61 (patch)
tree0c3b1fc5b1ddbd7af72227303503177689e1d403 /src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php
parent822c877949aff8ae57677671115f8f4fc69588d5 (diff)
downloadwallabag-f808b01692a835673f328d7221ba8c212caa9b61.tar.gz
wallabag-f808b01692a835673f328d7221ba8c212caa9b61.tar.zst
wallabag-f808b01692a835673f328d7221ba8c212caa9b61.zip
Add a real configuration for CS-Fixer
Diffstat (limited to 'src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php')
-rw-r--r--src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php
index 74da1e5f..d964439d 100644
--- a/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php
+++ b/src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php
@@ -76,7 +76,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand
76 $url = $this->similarUrl($entry['url']); 76 $url = $this->similarUrl($entry['url']);
77 77
78 /* @var $entry Entry */ 78 /* @var $entry Entry */
79 if (in_array($url, $urls)) { 79 if (in_array($url, $urls, true)) {
80 ++$duplicatesCount; 80 ++$duplicatesCount;
81 81
82 $em->remove($repo->find($entry['id'])); 82 $em->remove($repo->find($entry['id']));
@@ -93,7 +93,7 @@ class CleanDuplicatesCommand extends ContainerAwareCommand
93 93
94 private function similarUrl($url) 94 private function similarUrl($url)
95 { 95 {
96 if (in_array(substr($url, -1), ['/', '#'])) { // get rid of "/" and "#" and the end of urls 96 if (in_array(substr($url, -1), ['/', '#'], true)) { // get rid of "/" and "#" and the end of urls
97 return substr($url, 0, strlen($url)); 97 return substr($url, 0, strlen($url));
98 } 98 }
99 99