Skip to content

Commit fa5cf43

Browse files
Add return type unions to private/internal/final/test methods
1 parent 2b9cc1d commit fa5cf43

File tree

6 files changed

+6
-9
lines changed

6 files changed

+6
-9
lines changed

DataCollector/MemoryDataCollector.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ public function getName(): string
7979
return 'memory';
8080
}
8181

82-
/**
83-
* @return int|float
84-
*/
85-
private function convertToBytes(string $memoryLimit)
82+
private function convertToBytes(string $memoryLimit): int|float
8683
{
8784
if ('-1' === $memoryLimit) {
8885
return -1;

EventListener/DebugHandlersListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @final
3030
*
31-
* @internal since Symfony 5.3
31+
* @internal
3232
*/
3333
class DebugHandlersListener implements EventSubscriberInterface
3434
{

Tests/HttpCache/TestHttpKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function isCatchingExceptions()
6767
return $this->catch;
6868
}
6969

70-
public function getController(Request $request)
70+
public function getController(Request $request): callable|false
7171
{
7272
return [$this, 'callController'];
7373
}

Tests/HttpCache/TestMultipleHttpKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function handle(Request $request, $type = HttpKernelInterface::MAIN_REQUE
5050
return parent::handle($request, $type, $catch);
5151
}
5252

53-
public function getController(Request $request)
53+
public function getController(Request $request): callable|false
5454
{
5555
return [$this, 'callController'];
5656
}

Tests/KernelTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ public function getNamespace()
521521
return '';
522522
}
523523

524-
public function getXsdValidationBasePath()
524+
public function getXsdValidationBasePath(): string|false
525525
{
526526
return false;
527527
}

Tests/TestHttpKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct()
2525
parent::__construct(new EventDispatcher(), $this, null, $this);
2626
}
2727

28-
public function getController(Request $request)
28+
public function getController(Request $request): callable|false
2929
{
3030
return [$this, 'callController'];
3131
}

0 commit comments

Comments
 (0)