Skip to content

Commit 78f2aaa

Browse files
[TASK] Mark nullable parameters explicit (#135)
1 parent 8f24ad6 commit 78f2aaa

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Classes/Dispatcher/AbstractDispatcher.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function __construct(
5656
public function processOperationByRequest(
5757
RequestContext $requestContext,
5858
Request $request,
59-
ResponseInterface &$response = null
59+
?ResponseInterface &$response = null
6060
): string {
6161
foreach ($this->apiResourceRepository->getAll() as $apiResource) {
6262
try {
@@ -90,7 +90,7 @@ protected function processOperation(
9090
OperationInterface $operation,
9191
array $route,
9292
Request $request,
93-
ResponseInterface &$response = null
93+
?ResponseInterface &$response = null
9494
): string {
9595
$handlers = $this->getHandlersSupportingOperation($operation, $request);
9696

Classes/Exception/AbstractException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ abstract class AbstractException extends \Exception implements ExceptionInterfac
2020
*/
2121
protected string $title;
2222

23-
protected static function translate(string $key, array $arguments = null): ?string
23+
protected static function translate(string $key, ?array $arguments = null): ?string
2424
{
2525
return LocalizationUtility::translate($key, 't3api', $arguments);
2626
}

Classes/Service/RouteService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static function getFullApiBaseUrl(): string
3434
. '/' . ltrim(self::getFullApiBasePath(), '/');
3535
}
3636

37-
public static function routeHasT3ApiResourceEnhancerQueryParam(ServerRequestInterface $request = null): bool
37+
public static function routeHasT3ApiResourceEnhancerQueryParam(?ServerRequestInterface $request = null): bool
3838
{
3939
$request = $request ?? self::getRequest();
4040
return $request instanceof ServerRequest && is_array($request->getQueryParams())

0 commit comments

Comments
 (0)