diff --git a/.phpcs.xml b/.phpcs.xml index 1259672..58389b9 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -16,6 +16,8 @@ + + diff --git a/api/check_duplicates.php b/api/check_duplicates.php index 19b4d08..01c3728 100644 --- a/api/check_duplicates.php +++ b/api/check_duplicates.php @@ -64,13 +64,11 @@ while ($row = $result->fetch_assoc()) { // Check for exact substring match if (stripos($row['title'], $title) !== false) { $similarity = 90; - } // Check SOUNDEX match - elseif (soundex($row['title']) === $soundexTitle) { + } elseif (soundex($row['title']) === $soundexTitle) { $similarity = 70; - } // Check word overlap - else { + } else { $titleWords = array_map('strtolower', preg_split('/\s+/', $title)); $rowWords = array_map('strtolower', preg_split('/\s+/', $row['title'])); $matchingWords = array_intersect($titleWords, $rowWords);