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 ->will( $this->returnArgument( simplification #1858

Open
reedy opened this issue Nov 12, 2022 · 0 comments · May be fixed by #1859
Open

Add ->will( $this->returnArgument( simplification #1858

reedy opened this issue Nov 12, 2022 · 0 comments · May be fixed by #1859

Comments

@reedy
Copy link

reedy commented Nov 12, 2022

Description (screenshot):
The plugin currently simplifies ->will( $this->returnValueMap( [ into ->willReturnMap( [ but from what I can tell, it doesn't do ->will( $this->returnArgument( into ->willReturnArgument(

Feels like it should be a simple addition into

final private static Map<String, String> methodsMapping = new HashMap<>();
static {
methodsMapping.put("returnValueMap", "willReturnMap");
methodsMapping.put("returnCallback", "willReturnCallback");
methodsMapping.put("returnValue", "willReturn");
}

Example

reedy added a commit to reedy/phpinspectionsea that referenced this issue Nov 12, 2022
@reedy reedy linked a pull request Nov 12, 2022 that will close this issue
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 a pull request may close this issue.

1 participant