diff --git a/src/Controllers/HistoryViewerController.php b/src/Controllers/HistoryViewerController.php index 8a5280d..0a1e880 100644 --- a/src/Controllers/HistoryViewerController.php +++ b/src/Controllers/HistoryViewerController.php @@ -355,7 +355,7 @@ public function getCompareForm(array $context) return $form; } - public function versionForm(HTTPRequest $request = null) + public function versionForm(?HTTPRequest $request = null) { if (!$request) { $this->jsonError(400); @@ -373,7 +373,7 @@ public function versionForm(HTTPRequest $request = null) } } - public function compareForm(HTTPRequest $request = null) + public function compareForm(?HTTPRequest $request = null) { if (!$request) { $this->jsonError(400); diff --git a/src/Forms/DataObjectVersionFormFactory.php b/src/Forms/DataObjectVersionFormFactory.php index a98d1b7..e424c96 100644 --- a/src/Forms/DataObjectVersionFormFactory.php +++ b/src/Forms/DataObjectVersionFormFactory.php @@ -38,7 +38,7 @@ class DataObjectVersionFormFactory implements FormFactory DataObjectVersionFormFactory::TYPE_HISTORY, ]; - public function getForm(RequestHandler $controller = null, $name = FormFactory::DEFAULT_NAME, $context = []) + public function getForm(?RequestHandler $controller = null, $name = FormFactory::DEFAULT_NAME, $context = []) { // Validate context foreach ($this->getRequiredContext() as $required) { @@ -91,7 +91,7 @@ public function isReadonlyFormType(array $context) return in_array($this->getFormType($context), $this->config()->get('readonly_types') ?? []); } - protected function getFormFields(RequestHandler $controller = null, $name, $context = []) + protected function getFormFields(?RequestHandler $controller, $name, $context = []) { $record = $context['Record']; /** @var FieldList $fields */ @@ -157,7 +157,7 @@ protected function removeSelectedRightTitles(FieldList $fields) } } - protected function getFormActions(RequestHandler $controller = null, $formName, $context = []) + protected function getFormActions(?RequestHandler $controller, $formName, $context = []) { $actions = FieldList::create(); $this->invokeWithExtensions('updateFormActions', $actions, $controller, $formName, $context);