Skip to content

Commit

Permalink
API Explicity mark nullable parameters for PHP 8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Nov 28, 2024
1 parent 0c3bfef commit f2d6c19
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Actions/NotifyUsersWorkflowAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/DataObjects/WorkflowInstance.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/Templates/WorkflowTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?? '')) {
Expand Down

0 comments on commit f2d6c19

Please sign in to comment.