Skip to content

refactor(score): normalize distance map values#140

Merged
donhardman merged 1 commit into
mainfrom
fix/autocomplete-with-numeric-prefix
Feb 26, 2026
Merged

refactor(score): normalize distance map values#140
donhardman merged 1 commit into
mainfrom
fix/autocomplete-with-numeric-prefix

Conversation

@donhardman
Copy link
Copy Markdown
Member

  • Add normalizeMapValues to Arrays utility
  • Use normalized values for distance scoring
  • Preserve string keys during normalization

@donhardman
Copy link
Copy Markdown
Member Author

donhardman commented Feb 20, 2026

The intent is to get rid of the PHP bug while utilizing Ds\Map instead of buggy arrays.

Example of the issue:

$ php -r '$a = "3"; $b[(string)$a] = 1; var_dump($b);'

array(1) {
  [3]=>
  int(1)
}

- Add normalizeMapValues to Arrays utility
- Use normalized values for distance scoring
- Preserve string keys during normalization

fix(client): add missing return statement in word validation
@donhardman donhardman force-pushed the fix/autocomplete-with-numeric-prefix branch from b3f2ad5 to 1995323 Compare February 20, 2026 13:36
@donhardman donhardman merged commit f3e7e3a into main Feb 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants