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

docs: fix PHPDoc types in Filter class. #7451

Merged
merged 3 commits into from
May 9, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions system/Filters/FilterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ interface FilterInterface
*
* @param array|null $arguments
*
* @return mixed
* @return RequestInterface|ResponseInterface|string|void
Copy link
Member

@kenjis kenjis Apr 30, 2023

Choose a reason for hiding this comment

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

This is a bit odd, but correct because now we can return any non-empty value.

Suggested change
* @return RequestInterface|ResponseInterface|string|void
* @return mixed|RequestInterface|ResponseInterface|void

Copy link
Member

Choose a reason for hiding this comment

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

I'm okay with this change, but I would not mind if we left it as it was (only mixed).
I don't have a strong opinion.

*/
public function before(RequestInterface $request, $arguments = null);

Expand All @@ -43,7 +43,7 @@ public function before(RequestInterface $request, $arguments = null);
*
* @param array|null $arguments
*
* @return mixed
* @return ResponseInterface|void
*/
public function after(RequestInterface $request, ResponseInterface $response, $arguments = null);
}
2 changes: 1 addition & 1 deletion system/Filters/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ public function enableFilters(array $names, string $when = 'before')
/**
* Returns the arguments for a specified key, or all.
*
* @return mixed
* @return array<string, string>|string
*/
public function getArguments(?string $key = null)
{
Expand Down