Skip to content

Commit

Permalink
Merge pull request #3433 from dlubitz/task/mark-nullable-method-param…
Browse files Browse the repository at this point in the history
…eters-as-nullable

TASK: Correctly mark nullable method parameters as nullable
  • Loading branch information
dlubitz authored Jan 17, 2025
2 parents 9dd959b + 07499c2 commit 98ff7ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Neos.Flow/Classes/Mvc/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function addFlashMessage($messageBody, $messageTitle = '', $severity = Er
* @see redirect()
* @api
*/
protected function forward(string $actionName, string $controllerName = null, string $packageKey = null, array $arguments = []): never
protected function forward(string $actionName, ?string $controllerName = null, ?string $packageKey = null, array $arguments = []): never
{
$nextRequest = clone $this->request;
$nextRequest->setControllerActionName($actionName);
Expand Down Expand Up @@ -269,7 +269,7 @@ protected function forwardToRequest(ActionRequest $request): never
* @see forward()
* @api
*/
protected function redirect(string $actionName, ?string $controllerName = null, ?string $packageKey = null, array $arguments = [], int $delay = 0, int $statusCode = 303, string $format = null): never
protected function redirect(string $actionName, ?string $controllerName = null, ?string $packageKey = null, array $arguments = [], int $delay = 0, int $statusCode = 303, ?string $format = null): never
{
if ($packageKey !== null && str_contains($packageKey, '\\') !== false) {
[$packageKey, $subpackageKey] = explode('\\', $packageKey, 2);
Expand Down
2 changes: 1 addition & 1 deletion Neos.Flow/Classes/Reflection/ReflectionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ public function getPropertyNamesByAnnotation(string $className, string $annotati
* @return array<object>
* @api
*/
public function getPropertyAnnotations(string $className, string $propertyName, string $annotationClassName = null): array
public function getPropertyAnnotations(string $className, string $propertyName, ?string $annotationClassName = null): array
{
$className = $this->prepareClassReflectionForUsage($className);
if (!isset($this->classReflectionData[$className][self::DATA_CLASS_PROPERTIES][$propertyName][self::DATA_PROPERTY_ANNOTATIONS])) {
Expand Down
2 changes: 1 addition & 1 deletion Neos.Flow/Classes/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static function create(): self
return new static();
}

public static function createRemote(string $sessionIdentifier, string $storageIdentifier, int $lastActivityTimestamp = null, array $tags): self
public static function createRemote(string $sessionIdentifier, string $storageIdentifier, ?int $lastActivityTimestamp = null, array $tags = []): self
{
$session = new static();
$session->sessionMetaData = new SessionMetaData(
Expand Down

0 comments on commit 98ff7ad

Please sign in to comment.