Ignore:
Timestamp:
Nov 20, 2020, 12:08:12 AM (4 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.
Location:
trunk/Modules/NetworkConfigAirOS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigAirOS/Generators/Signal.php

    r873 r887  
    55class ConfigAirOSSignal extends NetworkConfigItem
    66{
    7   function ReadWirelessRegistration()
     7  function ReadWirelessRegistration(): void
    88  {
    99    $Time = time();
     
    1919      //$SSHClient->Debug = true;
    2020      $Result = $SSHClient->Execute('wstalist');
    21       if (count($Result) > 0) 
    22       {     
     21      if (count($Result) > 0)
     22      {
    2323      //print_r($Result);
    2424      $Array = json_decode(implode("\n", $Result), true);
     
    4444      echo("\n");
    4545      } else echo("Empty response\n");
    46      
    4746    }
    4847  }
    4948
    50   function Run()
     49  function Run(): void
    5150  {
    5251    RepeatFunction(60 * 60, array($this, 'ReadWirelessRegistration'));
  • trunk/Modules/NetworkConfigAirOS/NetworkConfigAirOS.php

    r781 r887  
    55class ModuleNetworkConfigAirOS extends AppModule
    66{
    7   function __construct($System)
     7  function __construct(System $System)
    88  {
    99    parent::__construct($System);
     
    1616  }
    1717
    18   function DoInstall()
     18  function DoInstall(): void
    1919  {
    2020  }
    2121
    22   function DoUnInstall()
     22  function DoUnInstall(): void
    2323  {
    2424  }
    2525
    26   function DoStart()
     26  function DoStart(): void
    2727  {
    28     $this->System->ModuleManager->Modules['NetworkConfig']->RegisterConfigItem('airos-signal', 'ConfigAirOSSignal');
     28    ModuleNetworkConfig::Cast($this->System->GetModule('NetworkConfig'))->RegisterConfigItem('airos-signal', 'ConfigAirOSSignal');
    2929  }
    3030}
Note: See TracChangeset for help on using the changeset viewer.