Skip to content

Commit ff3a113

Browse files
committed
fix: remove removed rector rule from skip list and fix arrow function return types
1 parent 5a6106e commit ff3a113

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

rector.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector;
2626
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
2727
use Rector\DeadCode\Rector\MethodCall\RemoveNullArgOnNullDefaultParamRector;
28-
use Rector\DeadCode\Rector\Property\RemoveDefaultValueFromAssignedPropertyRector;
2928
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
3029
use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector;
3130
use Rector\EarlyReturn\Rector\If_\RemoveAlwaysElseRector;
@@ -104,9 +103,6 @@
104103
__DIR__ . '/system/HTTP/Response.php',
105104
],
106105

107-
// Keep property defaults for backward compatibility.
108-
RemoveDefaultValueFromAssignedPropertyRector::class,
109-
110106
ReadOnlyPropertyRector::class => [
111107
__DIR__ . '/system/Cache/ResponseCache.php',
112108
__DIR__ . '/system/HotReloader/IteratorFilter.php',

tests/system/Session/Handlers/FileHandlerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public function testOpenThrowsForInvalidSavePath(): void
223223
$handler = $this->getInstance();
224224

225225
$this->expectException(SessionException::class);
226-
$this->withSuppressedErrors(fn () => $handler->open($this->tempPath . '/blocker/sub', $this->sessionName));
226+
$this->withSuppressedErrors(fn (): bool => $handler->open($this->tempPath . '/blocker/sub', $this->sessionName));
227227
}
228228

229229
public function testOpenThrowsForWriteProtectedSavePath(): void
@@ -300,7 +300,7 @@ public function testReadFailsWhenFileCannotBeOpened(): void
300300
$id = self::sessionId('4');
301301
mkdir($this->tempPath . '/' . $this->sessionName . $id, 0700, true);
302302

303-
$result = $this->withSuppressedErrors(static fn () => $handler->read($id));
303+
$result = $this->withSuppressedErrors(static fn (): string|false => $handler->read($id));
304304

305305
$this->assertFalse($result);
306306
$this->assertLogContains('error', 'Session: Unable to open file');
@@ -526,7 +526,7 @@ public function testGCWhenDirectoryCannotBeOpened(): void
526526
try {
527527
$handler = $this->getInstance(['savePath' => $dir]);
528528

529-
$result = $this->withSuppressedErrors(static fn () => $handler->gc(3600));
529+
$result = $this->withSuppressedErrors(static fn (): int|false => $handler->gc(3600));
530530

531531
$this->assertFalse($result);
532532
$this->assertLogContains('debug', "Session: Garbage collector couldn't list files under directory");

0 commit comments

Comments
 (0)