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/Modules/TimeMeasure/Main.php

    r874 r887  
    33class PageMeasure extends Page
    44{
    5   var $GraphTimeRanges;
    6   var $DefaultVariables;
    7   var $ImageHeight;
    8   var $ImageWidth;
    9 
    10   function __construct($System)
     5  public array $GraphTimeRanges;
     6  public array $DefaultVariables;
     7  public int $ImageHeight;
     8  public int $ImageWidth;
     9
     10  function __construct(System $System)
    1111  {
    1212    parent::__construct($System);
     
    2323    );
    2424    $this->GraphTimeRanges = array
    25   (
    26     'hour' => array(
    27       'caption' => 'Hodina',
    28       'period' => 3600,
    29     ),
    30     'day' => array(
    31       'caption' => 'Den',
    32       'period' => 86400, // 3600 * 24,
    33     ),
    34     'week' => array(
    35       'caption' => 'Týden',
    36       'period' => 604800, // 3600 * 24 * 7,
    37     ),
    38     'month' => array(
    39       'caption' => 'Měsíc',
    40       'period' => 2592000, // 3600 * 24 * 30,
    41     ),
    42     'year' => array(
    43       'caption' => 'Rok',
    44       'period' => 31536000, // 3600 * 24 * 365,
    45     ),
    46     'years' => array(
    47       'caption' => 'Desetiletí',
    48       'period' => 315360000, // 3600 * 24 * 365 * 10,
    49     ),
    50   );
     25    (
     26      'hour' => array(
     27        'caption' => 'Hodina',
     28        'period' => 3600,
     29      ),
     30      'day' => array(
     31        'caption' => 'Den',
     32        'period' => 86400, // 3600 * 24,
     33      ),
     34      'week' => array(
     35        'caption' => 'Týden',
     36        'period' => 604800, // 3600 * 24 * 7,
     37      ),
     38      'month' => array(
     39        'caption' => 'Měsíc',
     40        'period' => 2592000, // 3600 * 24 * 30,
     41      ),
     42      'year' => array(
     43        'caption' => 'Rok',
     44        'period' => 31536000, // 3600 * 24 * 365,
     45      ),
     46      'years' => array(
     47        'caption' => 'Desetiletí',
     48        'period' => 315360000, // 3600 * 24 * 365 * 10,
     49      ),
     50    );
    5151  }
    5252
     
    114114  }
    115115
    116   function Show()
     116  function Show(): string
    117117  {
    118118    $Debug = 0;
     
    182182  }
    183183
    184   function Graph()
     184  function Graph(): string
    185185  {
    186186    $Output = '<strong>Graf:</strong><br/>';
     
    194194  }
    195195
    196   function MeasureTable()
     196  function MeasureTable(): string
    197197  {
    198198    $PrefixMultiplier = new PrefixMultiplier();
     
    266266class PageMeasureAddValue extends Page
    267267{
    268   function Show()
     268  function Show(): string
    269269  {
    270270    $this->ClearPage = true;
Note: See TracChangeset for help on using the changeset viewer.