Skip to content

Add missing type annotations to core library method signatures#8184

Merged
dereuromark merged 1 commit into5.xfrom
fix-core-library-signatures
Jan 28, 2026
Merged

Add missing type annotations to core library method signatures#8184
dereuromark merged 1 commit into5.xfrom
fix-core-library-signatures

Conversation

@dereuromark
Copy link
Copy Markdown
Member

Summary

  • Adds proper type annotations to method signatures across 8 core library documentation files
  • Aligns signatures with actual CakePHP 5.x source code
  • Covers approximately 50+ method signatures total

Files updated:

  • app.md: className() - added string types for parameters
  • collections.md: ~33 methods - full type annotations (callable, string, int, mixed, etc.)
  • email.md: setAttachments(), setEmailPattern() - added parameter types and return types
  • inflector.md: 10 methods - verified types match source
  • number.md: setDefaultCurrency() - changed to static and added nullable string type
  • text.md: transliterate(), toList() - verified types match source
  • time.md: 8 methods - added Closure/array/string/int types for format params, bool returns for comparison methods
  • xml.md: build(), toArray() - verified types match source

Test plan

  • Verify documentation renders correctly
  • Spot check a few method signatures against CakePHP 5.x source

Refs #7744

Updated method signatures to include proper type annotations:
- app.md: className() parameter types
- collections.md: ~33 methods with full type annotations
- email.md: setAttachments(), setEmailPattern() types and return
- inflector.md: All 10 methods already had types (verified)
- number.md: setDefaultCurrency() static and nullable type
- text.md: transliterate(), toList() types (verified)
- time.md: setJsonEncodeFormat(), i18nFormat(), comparison methods
- xml.md: build(), toArray() types (verified)

Refs #7744
@dereuromark dereuromark merged commit fd5b5e7 into 5.x Jan 28, 2026
5 checks passed
@dereuromark dereuromark deleted the fix-core-library-signatures branch January 28, 2026 16:16
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