diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2017-07-03 13:39:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-03 13:39:54 +0200 |
commit | 71e1cbc8eb5928d393b0772055d6b711e90a09b3 (patch) | |
tree | 71795eadcf13fda9198b8cd9a3da26d51826bbd9 /src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php | |
parent | 822c877949aff8ae57677671115f8f4fc69588d5 (diff) | |
parent | 38520658addc217f127b0627ea28dcf8d6e6178c (diff) | |
download | wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.tar.gz wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.tar.zst wallabag-71e1cbc8eb5928d393b0772055d6b711e90a09b3.zip |
Merge pull request #3258 from wallabag/cs-fixer
Add a real configuration for CS-Fixer
Diffstat (limited to 'src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Command/CleanDuplicatesCommand.php | 4 |
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 | ||