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

ArrowFunctionToAnonymousFunctionRector - failing test #1512

Closed

Conversation

ondrejmirtes
Copy link
Contributor

The failure:

Failed asserting that string matches format description.
--- Expected
+++ Actual
@@ @@

     public function table(int $terminalWidth, int $maxHeaderWidth): void
     {
-        $f = static function ($rows) use ($terminalWidth, $maxHeaderWidth) : array {
+        $f = static function ($rows) : array {
             return array_map(static function ($row) use ($terminalWidth, $maxHeaderWidth) : array {
                 return array_map(static function ($s) use ($terminalWidth, $maxHeaderWidth) {
                     if ($terminalWidth > $maxHeaderWidth + 5) {

@samsonasik
Copy link
Member

@ondrejmirtes it seems because of inside CallLilke, I created PR #1514 for it.

samsonasik added a commit that referenced this pull request Dec 17, 2021
… CallLike + preserve byRef (#1514)

* ArrowFunctionToAnonymousFunctionRector - failing test

* Closes #1512

* phpstan

* clean up

* ArrowFunctionToAnonymousFunctionRector - preserve byRef in closure use

* [ci-review] Rector Rectify

* [ci-review] Rector Rectify

Co-authored-by: Ondrej Mirtes <ondrej@mirtes.cz>
Co-authored-by: GitHub Action <action@github.com>
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 this pull request may close these issues.

2 participants