Changeset 95 for trunk/Global.php


Ignore:
Timestamp:
Dec 6, 2021, 11:33:48 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
  • Added: Explicit types for better type checking.
  • Fixed: Support for php 8.0.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Global.php

    r92 r95  
    55include_once('Packages/Common/Common.php');
    66
    7 function HumanDate($Time)
     7function HumanDate(int $Time): string
    88{
    99  return date('j.n.Y', $Time);
    1010}
    1111
    12 function GetMicrotime()
     12function GetMicrotime(): string
    1313{
    1414  list($Usec, $Sec) = explode(" ", microtime());
     
    1616}
    1717
    18 function MakeLink($Target, $Title)
     18function MakeLink(string $Target, string $Title): string
    1919{
    2020  return '<a href="'.$Target.'">'.$Title.'</a>';
    2121}
    2222
    23 function Table($Table)
     23function Table(array $Table): string
    2424{
    2525  $Result = '<table cellspacing="0" class="BasicTable">';
     
    3939}
    4040
    41 function ShowEditTable($ClassName, $Values)
     41function ShowEditTable(string $ClassName, array $Values): string
    4242{
    4343  global $Classes, $Types;
     
    7272}
    7373
    74 function ProcessURL()
     74function ProcessURL(): array
    7575{
    7676  if (array_key_exists('REDIRECT_QUERY_STRING', $_SERVER))
     
    8686}
    8787
    88 function GetQueryStringArray($QueryString)
     88function GetQueryStringArray(string $QueryString): array
    8989{
    9090  $Result = array();
     
    102102}
    103103
    104 function SetQueryStringArray($QueryStringArray)
     104function SetQueryStringArray(array $QueryStringArray): string
    105105{
    106106  $Parts = array();
Note: See TracChangeset for help on using the changeset viewer.