mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-31 16:30:51 +00:00
[BetterStandardPrinter] Using Expr_ArrowFunction->returnType with print return type double colon right after the bracket (#596)
This commit is contained in:
parent
e4b356c117
commit
3eb503653f
|
@ -28,7 +28,7 @@ final class SomeArrowFunction
|
|||
{
|
||||
public function action()
|
||||
{
|
||||
return fn() : \Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector\Source\SomeResponse => new SomeResponse();
|
||||
return fn(): \Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector\Source\SomeResponse => new SomeResponse();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ class App
|
|||
|
||||
function () {
|
||||
|
||||
fn() : \Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector\Fixture\App => App::init();
|
||||
fn(): \Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector\Fixture\App => App::init();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ final class BetterStandardPrinter extends Standard
|
|||
$this->insertionMap['Stmt_ClassMethod->returnType'] = [')', false, ': ', null];
|
||||
$this->insertionMap['Stmt_Function->returnType'] = [')', false, ': ', null];
|
||||
$this->insertionMap['Expr_Closure->returnType'] = [')', false, ': ', null];
|
||||
$this->insertionMap['Expr_ArrowFunction->returnType'] = [')', false, ': ', null];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user