Skip to content

Commit 57106e8

Browse files
committed
add bool to arrow function too
1 parent 5a2aeca commit 57106e8

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

rules-tests/CodeQuality/Rector/MethodCall/WithCallbackIdenticalToStandaloneAssertsRector/Fixture/skip_this.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ final class SkipThis extends TestCase
4141
$someMock->expects($this->any())
4242
->method('trans')
4343
->with(
44-
$this->callback(function ($args): void {
44+
$this->callback(function ($args): bool {
4545
$this->assertCount(5, $args);
4646
$this->assertSame($this->expectedValue, $args[0]);
4747
return true;

rules-tests/CodeQuality/Rector/MethodCall/WithCallbackIdenticalToStandaloneAssertsRector/Fixture/use_variable.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class UseVariable extends TestCase
3737
$someMock->expects($this->any())
3838
->method('trans')
3939
->with(
40-
$this->callback(function ($args) use ($expectedValue): void {
40+
$this->callback(function ($args) use ($expectedValue): bool {
4141
$this->assertCount(5, $args);
4242
$this->assertSame($expectedValue, $args[0]);
4343
return true;

rules-tests/CodeQuality/Rector/MethodCall/WithCallbackIdenticalToStandaloneAssertsRector/Fixture/use_variable_require_once.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ final class UseVariableRequireOnce extends TestCase
3737
$someMock->expects($this->any())
3838
->method('trans')
3939
->with(
40-
$this->callback(function ($args) use ($expectedValue): void {
40+
$this->callback(function ($args) use ($expectedValue): bool {
4141
$this->assertCount(5, $args);
4242
$this->assertSame($expectedValue, $args[0]);
4343
$this->assertSame($expectedValue, $args[2]);

rules-tests/CodeQuality/Rector/MethodCall/WithCallbackIdenticalToStandaloneAssertsRector/Fixture/with_arrow_function.php.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ final class WithArrowFunction extends TestCase
3838
->method('trans')
3939
->with(
4040
$this->callback(
41-
function ($args): void {
41+
function ($args): bool {
4242
$this->assertCount(5, $args);
4343
$this->assertInstanceOf(\stdClass::class, $args[0]);
4444
return true;

rules/CodeQuality/Rector/MethodCall/WithCallbackIdenticalToStandaloneAssertsRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function refactor(Node $node): MethodCall|null
144144
'params' => $argAndFunctionLike->getFunctionLike()
145145
->params,
146146
'stmts' => $assertExpressions,
147-
'returnType' => new Identifier('void'),
147+
'returnType' => new Identifier('bool'),
148148
'uses' => $externalVariables,
149149
]);
150150

0 commit comments

Comments
 (0)