Ignore:
Timestamp:
Apr 6, 2020, 11:56:19 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Do not use parenthesis around returned value.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/TimeMeasure/Measurement/System.php

    r873 r874  
    1414    {
    1515      fclose($Fp1);
    16       return (TRUE);
     16      return TRUE;
    1717    } else
    1818    {
    1919      //echo($ERROR_NO.','.$ERROR_STR);
    20       return (FALSE);
     20      return FALSE;
    2121    }
    2222    restore_error_handler();
     
    3434      $Time = $Parts[7];
    3535      $TimeParts = explode('=', $Time);
    36       return ($TimeParts[1]);
    37     } else return (0);
     36      return $TimeParts[1];
     37    } else return 0;
    3838  }
    3939
     
    4848    while (strpos($Row, '  ') !== false) $Row = str_replace('  ', ' ', $Row);
    4949    $RowParts2 = explode(' ', $Row);
    50     return ($RowParts[2] + $RowParts2[2]);
     50    return $RowParts[2] + $RowParts2[2];
    5151  }
    5252
     
    8181    }
    8282    file_put_contents($CpuStateFileName, serialize($CpuUsage));
    83     return (100 - round($CpuUsagePercent['Idle'], 2));
     83    return 100 - round($CpuUsagePercent['Idle'], 2);
    8484  }
    8585
     
    114114    }
    115115    file_put_contents($NetworkStateFile, serialize($NetworkState));
    116     return ($NetworkState);
     116    return $NetworkState;
    117117  }
    118118
     
    120120  {
    121121    $NetworkState = $this->GetNetworkState();
    122     return ($NetworkState['Interface']['DownAverage']);
     122    return $NetworkState['Interface']['DownAverage'];
    123123  }
    124124
     
    126126  {
    127127    $NetworkState = $this->GetNetworkState();
    128     return ($NetworkState['Interface']['UpAverage']);
     128    return $NetworkState['Interface']['UpAverage'];
    129129  }
    130130
     
    134134    $Output = array();
    135135    exec('cat /proc/net/nf_conntrack|grep "dst='.$HostIP.' "|grep "dport='.$Port.' "|grep "ASSURED"', $Output);
    136     return (count($Output));
     136    return count($Output);
    137137  }
    138138
     
    145145    $Parts = explode(' ', $Row);
    146146    $Value = str_replace(',', '.', $Parts[11]);
    147     return ($Value);
     147    return $Value;
    148148  }
    149149
    150150  function DiskFree($Path)
    151151  {
    152     return (disk_free_space($Path));
     152    return disk_free_space($Path);
    153153  }
    154154
     
    163163        $Line = substr($Line, strpos($Line, '+') + 1);
    164164        $Line = substr($Line, 0, strpos($Line, '°'));
    165         return ($Line);
     165        return $Line;
    166166      }
    167167    }
    168     return (0);
     168    return 0;
    169169  }
    170170
     
    175175    fclose($File);
    176176    $UptimeParts = explode(' ', $Uptime);
    177     return ($UptimeParts[0]);
     177    return $UptimeParts[0];
    178178  }
    179179}
Note: See TracChangeset for help on using the changeset viewer.