Skip to content

Added stricter type hints and update PHPUnit test mocks for improved type safety across various classes and test cases. #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 31, 2025

Conversation

tbialcz
Copy link
Contributor

@tbialcz tbialcz commented May 30, 2025

🎫 Issue n/a

Description:

Added native : string return types to visit() and escapeWord() methods in WordVisitor to prevent PHPStan future warning about missing native return type declarations.

Updated UserMetadataAggregationKeyMapperTest to:

  • type-hint $aggregation parameter as UserMetadataTermAggregation (not general Aggregation)
  • convert user ID keys to strings before passing to map() method, matching expected array type.
  • This improves type safety and eliminates PHPStan errors/warnings during test runs.

@tbialcz tbialcz requested a review from a team May 30, 2025 09:24
@ezrobot ezrobot requested review from adamwojs, mikadamczyk, Steveb-p, alongosz, ciastektk, ViniTou, barw4 and wiewiurdp and removed request for a team May 30, 2025 09:24
…type safety across various classes and test cases.
@tbialcz tbialcz force-pushed the solr-query-wordvisitor-return-types branch from 6cbdcd7 to 0386a26 Compare May 30, 2025 11:25
Copy link

@adamwojs adamwojs merged commit 57ba2d0 into main May 31, 2025
17 checks passed
@adamwojs adamwojs deleted the solr-query-wordvisitor-return-types branch May 31, 2025 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants