Skip to content

Commit e24d2bd

Browse files
committed
fixed: PHP implicit null declaration
1 parent ba0cb21 commit e24d2bd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/functions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function event_manager_event_get_relationship_options(): array {
4646
*
4747
* @return string
4848
*/
49-
function event_manager_create_unsubscribe_code(\EventRegistration $registration, \Event $event = null): string {
49+
function event_manager_create_unsubscribe_code(\EventRegistration $registration, ?\Event $event = null): string {
5050
$event = $event ?? $registration->getOwnerEntity();
5151

5252
return elgg_build_hmac([$registration->guid, $event->time_created])->getToken();
@@ -153,7 +153,7 @@ function event_manager_send_registration_validation_email(\Event $event, \ElggEn
153153
*
154154
* @return string
155155
*/
156-
function event_manager_format_date(int $timestamp = null): string {
156+
function event_manager_format_date(?int $timestamp = null): string {
157157
return gmdate(elgg_echo('event_manager:date:format'), $timestamp);
158158
}
159159

@@ -178,7 +178,7 @@ function event_manager_get_maps_provider(): string {
178178
*
179179
* @return array
180180
*/
181-
function event_manager_prepare_form_vars(\Event $event = null): array {
181+
function event_manager_prepare_form_vars(?\Event $event = null): array {
182182

183183
// defaults
184184
$values = [

0 commit comments

Comments
 (0)