Ignore:
Timestamp:
Nov 20, 2020, 12:08:12 AM (3 years ago)
Author:
chronos
Message:
  • Added: Static types added to almost all classes, methods and function. Supported by PHP 7.4.
  • Fixed: Various found code issues.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Form/Types/IPv6Address.php

    r874 r887  
    55class TypeIPv6Address extends TypeBase
    66{
    7   function OnView($Item)
     7  function OnView(array $Item): ?string
    88  {
    99    $Output = $Item['Value'];
     
    1111  }
    1212
    13   function OnEdit($Item)
     13  function OnEdit(array $Item): string
    1414  {
    1515    $Output = '<input type="text" name="'.$Item['Name'].'" value="'.$Item['Value'].'"/>';
     
    1717  }
    1818
    19   function OnLoad($Item)
     19  function OnLoad(array $Item): ?string
    2020  {
    2121    return $_POST[$Item['Name']];
    2222  }
    2323
    24   function Validate($Item)
     24  function Validate(array $Item): bool
    2525  {
    2626    if ($Item['Null'] and ($Item['Value'] == '')) return true;
     
    2828  }
    2929
    30   function GetValidationFormat()
     30  function GetValidationFormat(): string
    3131  {
    3232    return 'xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx kde x je hexa hodnota 0..f';
Note: See TracChangeset for help on using the changeset viewer.