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

fix return type GetProcessor.php #16462

Merged
merged 1 commit into from
Aug 7, 2023
Merged

fix return type GetProcessor.php #16462

merged 1 commit into from
Aug 7, 2023

Conversation

catsmeatman
Copy link
Contributor

What does it do?

add string type to return types initialize method

Why is it needed?

method initialize GetProcessor.php can return bool or string value.

How to test

Create a inherited class of GetProcessor.php. Add return types in initialize method function initialize() :bool. Now in all cases will returned true. If add return types function initialize() :bool|true (as php DocBlock) everything will be alright.

@opengeek
Copy link
Member

opengeek commented Aug 4, 2023

Why would initialize() return a string value?

@Mark-H
Copy link
Collaborator

Mark-H commented Aug 4, 2023

Errors or validation that prevents a processor from continuing (i.e. it's process() method should not be run) are returned as a lexicon string. If you expand the changed code block there are a number of examples right there.

@catsmeatman
Copy link
Contributor Author

Why would initialize() return a string value?

core/src/Revolution/Processors/Model/GetProcessor.php in line 41 or 46 return string from lexicon

@opengeek opengeek added the cla-signed CLA confirmed for contributors to this PR. label Aug 7, 2023
@opengeek opengeek added this to the v3.0.4 milestone Aug 7, 2023
@opengeek opengeek merged commit b47a3c6 into modxcms:3.x Aug 7, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA confirmed for contributors to this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants