diff --git a/src/Actions/NotifyUsersWorkflowAction.php b/src/Actions/NotifyUsersWorkflowAction.php index 08d68f6f..c56be4ad 100644 --- a/src/Actions/NotifyUsersWorkflowAction.php +++ b/src/Actions/NotifyUsersWorkflowAction.php @@ -206,7 +206,7 @@ public function getContextFields(DataObject $target) * @param Member $member An optional member to use. If null, will use the current logged in member * @return array */ - public function getMemberFields(Member $member = null) + public function getMemberFields(?Member $member = null) { if (!$member) { $member = Security::getCurrentUser(); diff --git a/src/DataObjects/WorkflowInstance.php b/src/DataObjects/WorkflowInstance.php index 7f300862..44702f49 100644 --- a/src/DataObjects/WorkflowInstance.php +++ b/src/DataObjects/WorkflowInstance.php @@ -324,7 +324,7 @@ public function getTargetDiff() * @param WorkflowDefinition $definition * @param DataObject $for */ - public function beginWorkflow(WorkflowDefinition $definition, DataObject $for = null) + public function beginWorkflow(WorkflowDefinition $definition, ?DataObject $for = null) { if (!$this->ID) { $this->write(); diff --git a/src/Templates/WorkflowTemplate.php b/src/Templates/WorkflowTemplate.php index 730f8e92..f0b8ccfb 100644 --- a/src/Templates/WorkflowTemplate.php +++ b/src/Templates/WorkflowTemplate.php @@ -190,7 +190,7 @@ public function createRelations($definition = null) * @return WorkflowAction * @throws Exception */ - protected function createAction($name, $actionTemplate, WorkflowDefinition $definition = null) + protected function createAction($name, $actionTemplate, ?WorkflowDefinition $definition = null) { $type = $actionTemplate['type']; if (!$type || !class_exists($type ?? '')) {