Skip to content

Conversation

@deviantintegral
Copy link
Owner

Add missing typehints to all class properties across the codebase, replacing PHPDoc-only type annotations with native PHP property type declarations.

Changes include:

  • Added typehints to all properties in main classes (Har, Log, Entry, Request, Response, Cache, Content, etc.)
  • Added typehints to all trait properties (CommentTrait, NameTrait, BodySizeTrait, etc.)
  • Used nullable types (?Type) for properties that can be null
  • Set explicit default values where needed
  • Used -1.0 (float) for timing properties with -1 defaults
  • Updated comparisons in Timings class to use -1.0 for consistency

All tests pass successfully after these changes.

Add missing typehints to all class properties across the codebase,
replacing PHPDoc-only type annotations with native PHP property type
declarations.

Changes include:
- Added typehints to all properties in main classes (Har, Log, Entry,
  Request, Response, Cache, Content, etc.)
- Added typehints to all trait properties (CommentTrait, NameTrait,
  BodySizeTrait, etc.)
- Used nullable types (?Type) for properties that can be null
- Set explicit default values where needed
- Used -1.0 (float) for timing properties with -1 defaults
- Updated comparisons in Timings class to use -1.0 for consistency

All tests pass successfully after these changes.
@deviantintegral deviantintegral marked this pull request as ready for review December 15, 2025 19:54
@deviantintegral deviantintegral merged commit 45d95df into main Dec 15, 2025
7 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.

3 participants