Skip to content

Conversation

@Ayoub-Mabrouk
Copy link

Adds type hints and property type declarations to improve type safety.

Parser Library:

  • Added type hints to SignatureValidator::validateSignature() parameters and return type
  • Replaced docblock annotations with property type declarations in ParsedEvents

Laravel:

  • Added return type : string to all facade `getFacadeAcc

@eucyt eucyt self-requested a review January 13, 2026 06:36
@eucyt eucyt self-assigned this Jan 13, 2026
@eucyt
Copy link
Contributor

eucyt commented Jan 16, 2026

@Ayoub-Mabrouk
Thank you for your contribution. The code looks good.

However, the CI is failing, so could you please fix it?

https://github.com/line/line-bot-sdk-php/actions/runs/21058965581/job/60560797406?pr=772#step:14:16

You also need to update the documentation following the steps below and commit the changes.

wget https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.8.1/phpDocumentor.phar
php phpDocumentor.phar run -d src -t docs

@Ayoub-Mabrouk
Copy link
Author

Thank you for your contribution. The code looks good.

Thanks @eucyt 😊

However, the CI is failing, so could you please fix it?

i fixed it, i noticed CONTRIBUTING.md explains how to generate docs, but not when you need to do it (like after merging from master) or that you must commit the changes. This caused me to miss regenerating the docs.

Would it be helpful if I opened a PR to:

  1. Add a composer docs command to make it easier to regenerate
  2. Update CONTRIBUTING.md to clearly explain when/why you need to regenerate and commit the docs

This might help prevent others from hitting the same CI failure. Should I go ahead with a PR?

- Add type hints to SignatureValidator::validateSignature() parameters and return type
- Replace docblock annotations with PHP 8.1+ property type declarations in ParsedEvents

This improves type safety and modernizes the code to use PHP 8.1+ features.
Add return type hint (: string) to all Laravel facade getFacadeAccessor() methods:
- LINEChannelAccessTokenApi
- LINEInsightApi
- LINELiffApi
- LINEManageAudienceApi
- LINEManageAudienceBlobApi
- LINEMessagingApi
- LINEMessagingBlobApi

This improves type safety and IDE support.
@Ayoub-Mabrouk Ayoub-Mabrouk force-pushed the refactor/add-type-hints-parser branch from bab797b to 94debab Compare January 17, 2026 15:22
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