diff --git a/typo3/sysext/workspaces/Classes/Controller/ReviewController.php b/typo3/sysext/workspaces/Classes/Controller/ReviewController.php index 1a230043720517ff75bdf0740e54ed166cc18dd7..4e430362c0485535b7b2227732f31fb6c9301498 100644 --- a/typo3/sysext/workspaces/Classes/Controller/ReviewController.php +++ b/typo3/sysext/workspaces/Classes/Controller/ReviewController.php @@ -280,7 +280,7 @@ class ReviewController * @param int $workspaceId * @return string */ - protected function getModuleUri(int $workspaceId = null): string + protected function getModuleUri(?int $workspaceId = null): string { $parameters = [ 'id' => $this->pageId, diff --git a/typo3/sysext/workspaces/Classes/Domain/Model/DatabaseRecord.php b/typo3/sysext/workspaces/Classes/Domain/Model/DatabaseRecord.php index aa5ae23f8fe0007915c26d5e6f05f930ce58e499..b53049ecaa961064ee96f34c02db7bb07301e294 100644 --- a/typo3/sysext/workspaces/Classes/Domain/Model/DatabaseRecord.php +++ b/typo3/sysext/workspaces/Classes/Domain/Model/DatabaseRecord.php @@ -67,7 +67,7 @@ class DatabaseRecord * @param int $uid Id of the database record row * @param array|null $row The relevant database record row */ - public function __construct($table, $uid, array $row = null) + public function __construct($table, $uid, ?array $row = null) { $this->setTable($table); $this->setUid($uid); diff --git a/typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php b/typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php index 55b989e7f6acea22ccd0a5e68a262db0ef979d9b..807379a934facfd2c9df574473e99f9747c7e749 100644 --- a/typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php +++ b/typo3/sysext/workspaces/Classes/Domain/Record/StageRecord.php @@ -57,7 +57,7 @@ class StageRecord extends AbstractRecord * @param array $record * @return StageRecord|null */ - public static function get($uid, array $record = null) + public static function get($uid, ?array $record = null) { if (empty($record)) { $record = static::fetch('sys_workspace_stage', $uid); @@ -71,7 +71,7 @@ class StageRecord extends AbstractRecord * @param array $record * @return StageRecord */ - public static function build(WorkspaceRecord $workspace, $uid, array $record = null) + public static function build(WorkspaceRecord $workspace, $uid, ?array $record = null) { if (empty($record)) { $record = static::fetch('sys_workspace_stage', $uid); diff --git a/typo3/sysext/workspaces/Classes/Domain/Record/WorkspaceRecord.php b/typo3/sysext/workspaces/Classes/Domain/Record/WorkspaceRecord.php index 9f76f3beb79427048343c50b43aaffb038076e4c..8c19dbe2afa2f5f653c6512422f4a8f25e7ac769 100644 --- a/typo3/sysext/workspaces/Classes/Domain/Record/WorkspaceRecord.php +++ b/typo3/sysext/workspaces/Classes/Domain/Record/WorkspaceRecord.php @@ -72,7 +72,7 @@ class WorkspaceRecord extends AbstractRecord * @param array $record * @return WorkspaceRecord */ - public static function get($uid, array $record = null) + public static function get($uid, ?array $record = null) { if (empty($uid)) { $record = []; diff --git a/typo3/sysext/workspaces/Classes/Middleware/WorkspacePreview.php b/typo3/sysext/workspaces/Classes/Middleware/WorkspacePreview.php index 22ecb45d0c0b1718221404aa15388a7ace6b0b1b..47032255fc364f1cb70ade89dfd7feffff09f303 100644 --- a/typo3/sysext/workspaces/Classes/Middleware/WorkspacePreview.php +++ b/typo3/sysext/workspaces/Classes/Middleware/WorkspacePreview.php @@ -413,7 +413,7 @@ class WorkspacePreview implements MiddlewareInterface /** * Register or override the backend user as aspect, as well as the workspace information the user object is holding */ - protected function setBackendUserAspect(Context $context, BackendUserAuthentication $user = null) + protected function setBackendUserAspect(Context $context, ?BackendUserAuthentication $user = null) { $context->setAspect('backend.user', GeneralUtility::makeInstance(UserAspect::class, $user)); $context->setAspect('workspace', GeneralUtility::makeInstance(WorkspaceAspect::class, $user ? $user->workspace : 0)); diff --git a/typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php b/typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php index 1b32c33f38f9f192c7060e4fe7376afeb528300b..0546d589ee8e17c86fa7b897432950e699447114 100644 --- a/typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php +++ b/typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php @@ -148,7 +148,7 @@ class PreviewUriBuilder * @param array $versionRecord Optional version record data * @return string */ - public function buildUriForElement(string $table, int $uid, array $liveRecord = null, array $versionRecord = null): string + public function buildUriForElement(string $table, int $uid, ?array $liveRecord = null, ?array $versionRecord = null): string { $previewUri = $this->createPreviewUriForElement($table, $uid, $liveRecord, $versionRecord); $event = new RetrievedPreviewUrlEvent($table, $uid, $previewUri, [ @@ -161,7 +161,7 @@ class PreviewUriBuilder return $previewUri; } - protected function createPreviewUriForElement(string $table, int $uid, array $liveRecord = null, array $versionRecord = null): ?UriInterface + protected function createPreviewUriForElement(string $table, int $uid, ?array $liveRecord = null, ?array $versionRecord = null): ?UriInterface { if ($table === 'pages') { return BackendPreviewUriBuilder::create((int)BackendUtility::getLiveVersionIdOfRecord('pages', $uid)) @@ -221,7 +221,7 @@ class PreviewUriBuilder * @param int|null $workspaceId Which workspace ID to preview. * @return string Returns keyword to use in URL for ADMCMD_prev=, a 32 byte MD5 hash keyword for the URL: "?ADMCMD_prev=[keyword] */ - protected function compilePreviewKeyword(int $ttl = 172800, int $workspaceId = null): string + protected function compilePreviewKeyword(int $ttl = 172800, ?int $workspaceId = null): string { $keyword = md5(StringUtility::getUniqueId()); GeneralUtility::makeInstance(ConnectionPool::class)