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
Repair setcontent
#286
Repair setcontent
#286
Conversation
Could you explain those e.g. in the comment above getContentForTwig? |
No need for typehinting in phpdoc if they already exists, right? |
@xiaohutai if checkers won't complain, yes EDIT: actually they complain so please add them |
838e88d
to
5b67d8c
Compare
5062019
to
8a43d48
Compare
It's stricter than I thought 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works like a charm! 👍
(And my apologies for breaking stuff ;-) ) |
No, worries. It's actually to show that it's PHPStan complaining about things. Unless those parts are coded differently we can't really add those nice type hints yet. |
Fixes issues #282 and #283
This PR removes some type hints which is not a nice thing to do in general, but I don't know how to circumvent these issues in a nice way. Below is a summary.
Notes
At the moment,
setcontent
can returnnull
orContent
for single item when using{contenttype}/{id}
orQueryResultSet
(empty or not) for multiple items.This was changed in 82244ab#diff-5ee7c092d66585260210d467fb97c416
Function
parseValue
can get an integer when usingwhere { id: 1 }
.This was changed in ce98e9b#diff-9501bf2bce92196e20149014404e59fb
Function
getContentForTwig
actually gets three parameters:pages
orpages/1
printquery
,paging
where
parameters taken from... where { foo: bar } ...
This was changed in 1624cdc#diff-47ee526d7c161782611f5afd2e66c76d