public function excludeDuplicates(): LocationCollection
    {
        if ($this->count() < 2) {
            return $this;
        }

        $explodedTerms = array_map(function (Location $location): array {
            return explode(' ', $location->getValue());
        }, (array)$this);

        $explodedTermsCount = count($explodedTerms);
        $result = [];

        for ($i = 0; $i < $explodedTermsCount - 1; $i++) {
            for ($j = $i + 1; $j < $explodedTermsCount; $j++) {
                if (array_count_values($explodedTerms[$i]) == array_count_values($explodedTerms[$j])) {
                    unset($explodedTerms[$i]);
                    break;
                }
            }
        }

        foreach ($explodedTerms as $term) {
            $result[] = new Location(implode(' ', $term));
        }

        $this->exchangeArray($result);

        return $this;
    }