From 2272392a5339b22947931b7b35cb5d4e1c64be05 Mon Sep 17 00:00:00 2001 From: campbell-m <87438215+campbell-m@users.noreply.github.com> Date: Mon, 11 Nov 2024 18:56:49 +0000 Subject: [PATCH] Add type declarations --- web/edit_entry.php | 5 +++-- web/functions.inc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/edit_entry.php b/web/edit_entry.php index 7ac20568c..1cc606d5e 100644 --- a/web/edit_entry.php +++ b/web/edit_entry.php @@ -12,6 +12,7 @@ use MRBS\Form\ElementLabel; use MRBS\Form\ElementSelect; use MRBS\Form\ElementSpan; +use MRBS\Form\Field; use MRBS\Form\FieldDiv; use MRBS\Form\FieldInputCheckbox; use MRBS\Form\FieldInputCheckboxGroup; @@ -106,7 +107,7 @@ } -function get_field_create_by(string $create_by, bool $disabled=false) +function get_field_create_by(string $create_by, bool $disabled=false) : Field { $params = array('label' => get_vocab('createdby'), 'name' => 'create_by', @@ -119,7 +120,7 @@ function get_field_create_by(string $create_by, bool $disabled=false) } -function get_field_name(string $value, bool $disabled=false) +function get_field_name(string $value, bool $disabled=false) : Field { $params = array('label' => get_vocab('namebooker'), 'name' => 'name', diff --git a/web/functions.inc b/web/functions.inc index 28ea5aaa6..47186c889 100644 --- a/web/functions.inc +++ b/web/functions.inc @@ -2645,7 +2645,7 @@ function get_field_entry_input(array $params) : Field // field the field name, eg 'entry.create_by' // label the field label // name the field name -function get_user_field(array $params, bool $datalist=false) +function get_user_field(array $params, bool $datalist=false) : Field { if (method_exists(auth(), 'getUsernames')) {