Skip to content

Commit

Permalink
allow equal type
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Feb 23, 2025
1 parent 5d64edf commit f841c7e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Rector\Tests\Php74\Rector\Closure\ClosureToArrowFunctionRector\Fixture

use Illuminate\Support\Collection;

class SkipWithVarDoc
class SkipWithSpecificVarDoc
{
public function run()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Rector\Tests\Php74\Rector\Closure\ClosureToArrowFunctionRector\Fixture;

class WithEqualVarDoc
{
public function run()
{
function (string $var) {
/** @var string $var */
return $var;
};
}
}

?>
-----
<?php

namespace Rector\Tests\Php74\Rector\Closure\ClosureToArrowFunctionRector\Fixture;

class WithEqualVarDoc
{
public function run()
{
fn(string $var) =>
/** @var string $var */
$var;
}
}

?>

0 comments on commit f841c7e

Please sign in to comment.