Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Explicity mark nullable parameters for PHP 8.4 #563

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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