Skip to content
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

chore: better PHP types #4886

Merged
merged 1 commit into from
Aug 11, 2022
Merged

Conversation

alanpoulain
Copy link
Member

No description provided.

@alanpoulain alanpoulain force-pushed the chore/php-types branch 4 times, most recently from 4ba1fc6 to ad1eab2 Compare August 11, 2022 16:25
@alanpoulain alanpoulain marked this pull request as ready for review August 11, 2022 16:34
@alanpoulain alanpoulain force-pushed the chore/php-types branch 2 times, most recently from 3900a3a to 30b2ed5 Compare August 11, 2022 16:38
@alanpoulain alanpoulain merged commit 6ab093e into api-platform:main Aug 11, 2022
@@ -26,5 +26,5 @@ interface ProcessorInterface
/**
* Handle the state.
*/
public function process($data, Operation $operation, array $uriVariables = [], array $context = []);
public function process(mixed $data, Operation $operation, array $uriVariables = [], array $context = []);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any use case for returning something? Or should there be a void return type?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes there is: you return your resource, for instance after a POST to obtain the generated identifier.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, thanks

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