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

Add better IDE autocomplete for event method stubs #341

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

dereuromark
Copy link
Owner

Reverts #308 with the option to either enable or disable types in favor of docblocks.

Components have return types by default as there is no controller code interferring
Components have docblocks by default unless told otherwise, as here the parent code can cause the issues described in the linked PR

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (445f4a7) 82.68% compared to head (15744b0) 82.75%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #341      +/-   ##
============================================
+ Coverage     82.68%   82.75%   +0.06%     
- Complexity     1781     1783       +2     
============================================
  Files           114      114              
  Lines          4858     4876      +18     
============================================
+ Hits           4017     4035      +18     
  Misses          841      841              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dereuromark dereuromark merged commit 83a2cd1 into master Jan 11, 2024
16 checks passed
@dereuromark dereuromark deleted the better-event-method-annotation branch January 11, 2024 12:37
@dereuromark
Copy link
Owner Author

beforeRedirect(EventInterface $event, $url, Response $response)
Is invoked when the controller’s redirect method is called but before any further action. If this method returns false the controller will not continue on to redirect the request. The $url, and $response parameters allow you to inspect and modify the location or any other headers in the response.

The false part here is documented as possible return value/type. But this repo will not support this out of the box.
If this is needed, it can be manually adjusted in the code.

See cakephp/cakephp#16854 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants