Skip to content

Commit

Permalink
Add type declarations and fix TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
campbell-m committed Jun 27, 2024
1 parent 1ffcca3 commit f0cc6e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions web/edit_entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function get_field_create_by(string $create_by, bool $disabled=false)
}


function get_field_name($value, $disabled=false)
function get_field_name(string $value, $disabled=false)
{
$params = array('label' => get_vocab('namebooker'),
'name' => 'name',
Expand All @@ -132,7 +132,7 @@ function get_field_name($value, $disabled=false)
}


function get_field_description($value, $disabled=false)
function get_field_description(string $value, $disabled=false)
{
global $is_mandatory_field;

Expand Down Expand Up @@ -1466,7 +1466,7 @@ function getbookingdate(int $t, bool $is_end=false) : array
{
$end_date = $start_date;
}
list($end_year, $end_month, $end_day) = explode('-', $end_date);
list($end_year, $end_month, $end_day) = array_map('intval', explode('-', $end_date));
$end_time = mktime($end_hour, $end_minute, 0, $end_month, $end_day, $end_year);
$duration = $end_time - $start_time - cross_dst($start_time, $end_time);
}
Expand Down

0 comments on commit f0cc6e8

Please sign in to comment.