We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
back()
PHP version: 7.2 Full Command: rector process ./src
rector process ./src
back() function is being transformed incorrectly (without function usage)
Source:
<?php use Illuminate\Http\RedirectResponse; class Controller { public function someAction(): RedirectResponse { return back(); } }
Transformed:
<?php use Illuminate\Http\RedirectResponse; use Illuminate\Routing\Redirector; class Controller { /** @var Redirector */ private $redirector; public function __construct(Redirector $redirector) { $this->redirector = $redirector; } public function someAction(): RedirectResponse { return $this->redirector; } }
Expected behavior is to transform back() call correctly ($this->redirector->back())
$this->redirector->back()
The text was updated successfully, but these errors were encountered:
Thanks for reporting the issue.
Please send PR with failing test case, so we can spot the exact point of the error
Sorry, something went wrong.
Create new parameter method_if_no_args, fix transforming back() f…
method_if_no_args
9806f6c
…unction, add `back` file to test cases rectorphp#1824
Resolved by #1845
@sashabeton Just a tip to let Github close this automatically: https://help.github.com/en/articles/closing-issues-using-keywords
No branches or pull requests
PHP version: 7.2
Full Command:
rector process ./src
Current Behaviour
back()
function is being transformed incorrectly (without function usage)Source:
Transformed:
Expected Behaviour
Expected behavior is to transform
back()
call correctly ($this->redirector->back()
)The text was updated successfully, but these errors were encountered: