Skip to content

Conversation

DannyvdSluijs
Copy link
Collaborator

@DannyvdSluijs DannyvdSluijs commented Nov 24, 2024

This pull request includes several changes to the test files in the tests directory, focusing on enforcing strict types, improving method signatures, and using generators for data providers. The most important changes include adding strict types, refactoring method signatures, and converting data providers to use generators for better performance and readability.

Enforcing Strict Types:

  • Added declare(strict_types=1); at the beginning of multiple test files to enforce strict type checking. (tests/Constraints/FactoryTest.php [1] tests/Constraints/VeryBaseTestCase.php [2] tests/Drafts/BaseDraftTestCase.php [3] tests/Entity/JsonPointerTest.php [4] tests/Rfc3339Test.php [5]

Refactoring Method Signatures:

  • Updated method signatures to use type hints for parameters and return types, improving code clarity and type safety. (tests/Constraints/FactoryTest.php [1] tests/Constraints/TypeTest.php [2] tests/Constraints/VeryBaseTestCase.php [3] tests/Drafts/BaseDraftTestCase.php [4] tests/Entity/JsonPointerTest.php [5] tests/Rfc3339Test.php [6]

Using Generators for Data Providers:

  • Converted array-based data providers to use generators, enhancing performance and readability. (tests/Constraints/FactoryTest.php [1] tests/Entity/JsonPointerTest.php [2] tests/Rfc3339Test.php [3]

@DannyvdSluijs DannyvdSluijs force-pushed the Replace-param-annotation-with-native-type-hint-in-tests branch from e360671 to 1702f6d Compare November 24, 2024 22:14
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (6)
  • tests/Constraints/FactoryTest.php: Language not supported
  • tests/Constraints/TypeTest.php: Language not supported
  • tests/Constraints/VeryBaseTestCase.php: Language not supported
  • tests/Drafts/BaseDraftTestCase.php: Language not supported
  • tests/Entity/JsonPointerTest.php: Language not supported
  • tests/Rfc3339Test.php: Language not supported

@DannyvdSluijs DannyvdSluijs merged commit 14e41d8 into master Jan 10, 2025
19 checks passed
@DannyvdSluijs DannyvdSluijs deleted the Replace-param-annotation-with-native-type-hint-in-tests branch February 26, 2025 21:03
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.

1 participant