Changeset 95 for trunk/Graph.php


Ignore:
Timestamp:
Dec 6, 2021, 11:33:48 AM (2 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/Graph.php

    r92 r95  
    55class MeasureGraph
    66{
    7   var $Database;
    8   var $FontSize;
    9   var $FontFileNameName;
    10   var $ValueToImageHeigthCoefficient;
    11   var $DefaultWidth;
    12   var $DefaultHeight;
     7  public Database $Database;
     8  public int $FontSize;
     9  public string $FontFileNameName;
     10  public float $ValueToImageHeigthCoefficient;
     11  public int $DefaultWidth;
     12  public int $DefaultHeight;
    1313
    1414  function __construct(Database $Database)
     
    2222  }
    2323
    24   function Render()
     24  function Render(): void
    2525  {
    2626    global $Config;
     
    138138    $TimeRange = $EndTime - $StartTime;
    139139    $TimeMarksIndex = 0;
    140     while ((($TimeRange / $TimeMarks[$TimeMarksIndex]) > 1) and ($TimeMarksIndex < (count($TimeMarks) - 1))) 
     140    while ((($TimeRange / $TimeMarks[$TimeMarksIndex]) > 1) and ($TimeMarksIndex < (count($TimeMarks) - 1)))
    141141      $TimeMarksIndex += 1;
    142142    if ($TimeMarksIndex < 2) $TimeMarksIndex = 2;
Note: See TracChangeset for help on using the changeset viewer.