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/NetworkConfigRouterOS/Routerboard.php

    r874 r887  
    1919  }
    2020
    21   function Execute($Commands)
     21  function Execute(array $Commands): array
    2222  {
    2323    $Output = array();
     
    4444  }
    4545
    46   function ExecuteBatch($Commands)
     46  function ExecuteBatch(string $Commands): string
    4747  {
    4848    $Commands = trim($Commands);
     
    6565  }
    6666
    67   function ItemGet($Path)
     67  function ItemGet(array $Path): array
    6868  {
    6969    $Result = $this->Execute(implode(' ', $Path).' print');
     
    8282  }
    8383
    84   function ListGet($Path, $Properties, $Conditions = array())
     84  function ListGet(array $Path, array $Properties, array $Conditions = array()): array
    8585  {
    8686    $PropertyList = '"';
     
    116116  }
    117117
    118   function ListGetPrint($Path, $Properties, $Conditions = array())
     118  function ListGetPrint($Path, $Properties, $Conditions = array()): array
    119119  {
    120120    $ConditionList = '';
     
    151151  }
    152152
    153   function ListEraseAll($Path)
     153  function ListEraseAll(array $Path): void
    154154  {
    155155    $this->Execute(implode(' ', $Path).' { remove [find] }');
    156156  }
    157157
    158   function ListUpdate($Path, $Properties, $Values, $Condition = array(), $UsePrint = false)
     158  function ListUpdate(array $Path, array $Properties, array $Values, array $Condition = array(), bool $UsePrint = false): array
    159159  {
    160160    // Get current list from routerboard
Note: See TracChangeset for help on using the changeset viewer.