Skip to content

Commit

Permalink
Add type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
campbell-m committed Nov 11, 2024
1 parent afef113 commit 2272392
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions web/edit_entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion web/functions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
{
Expand Down

0 comments on commit 2272392

Please sign in to comment.