Skip to content
Merged
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
16 changes: 11 additions & 5 deletions lib/Common/SmartyPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ protected function RegisterClasses()
'QuotaDuration',
'QuotaScope',
'QuotaUnit',
'RegisterActions',
'RepeatMonthlyType',
'ReportActions',
'Report_GroupBy',
Expand All @@ -163,12 +164,14 @@ protected function RegisterClasses()
'ReservationEvent',
'ReservationReminderInterval',
'ReservationStatus',
'Resources',
'ResourceStatus',
'Schedule',
'ScheduleLayout',
'ScheduleStyle',
'SeriesUpdateScope',
'TermsOfService',
'UserAttribute',

];

Expand Down Expand Up @@ -322,7 +325,7 @@ public function FormatDate($params, $smarty)

$date = is_string($params['date']) ? Date::Parse($params['date']) : $params['date'];

/** @var $date Date */
/** @var Date $date */
$date = isset($params['timezone']) ? $date->ToTimezone($params['timezone']) : $date;

if (isset($params['format'])) {
Expand Down Expand Up @@ -369,7 +372,7 @@ public function DisplayControl($params, $smarty)
$type = $params['type'];
require_once(ROOT_DIR . "Controls/$type.php");

/** @var $control Control */
/** @var Control $control */
$control = new $type($this);

foreach ($params as $key => $val) {
Expand Down Expand Up @@ -1083,15 +1086,18 @@ public function UrlEncode($url)
return urlencode((string) $url);
}

public function Microtime(bool $as_float = false): string|float {
public function Microtime(bool $as_float = false): string|float
{
return microtime($as_float);
}

public function ArrayKeyExists(string|int|float|bool|null $key, array $array): bool {
public function ArrayKeyExists(string|int|float|bool|null $key, array $array): bool
{
return array_key_exists($key, $array);
}

public function Count(Countable|array $value, int $mode = COUNT_NORMAL): int {
public function Count(Countable|array $value, int $mode = COUNT_NORMAL): int
{
return count($value, $mode);
}

Expand Down