Ignore:
Timestamp:
Apr 6, 2020, 11:56:19 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Do not use parenthesis around returned value.
Location:
trunk/Modules/NetworkConfigRouterOS
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigRouterOS/Generators/AddressPortability.php

    r873 r874  
    1111{
    1212  $TimeParts = explode(':', $Time);
    13   return ($TimeParts[0] * 3600 + $TimeParts[1] * 60 + $TimeParts[2]);
     13  return $TimeParts[0] * 3600 + $TimeParts[1] * 60 + $TimeParts[2];
    1414}
    1515
  • trunk/Modules/NetworkConfigRouterOS/Generators/Common.php

    r873 r874  
    99  {
    1010    $DbRow = $DbResult->fetch_assoc();
    11     return ($DbRow['Id']);
     11    return $DbRow['Id'];
    1212  } else
    1313  {
    1414    $DbResult = $Database->query('INSERT INTO `NetworkMark` (`Comment`) VALUES ("'.$Comment.'")');
    15     return ($Database->insert_id);
     15    return $Database->insert_id;
    1616  }
    1717}
     
    2525  {
    2626    $DbRow = $DbResult->fetch_assoc();
    27     return ($DbRow['Id']);
     27    return $DbRow['Id'];
    2828  } else
    2929  {
    3030    $DbResult = $Database->query('INSERT INTO `NetworkMangleSubgroup` (`AddressRange`) VALUES ("'.$AddressRange.'")');
    31     return ($Database->insert_id);
     31    return $Database->insert_id;
    3232  }
    3333}
  • trunk/Modules/NetworkConfigRouterOS/Generators/Signal.php

    r873 r874  
    7474    if (substr($Value, -3, 3) == "Mbp") $Value = substr($Value, 0, -3); // without Mbp unit   
    7575    if (substr($Value, -1, 1) == "M") $Value = substr($Value, 0, -1); // without M unit
    76     return ($Value);
     76    return $Value;
    7777  }
    7878
  • trunk/Modules/NetworkConfigRouterOS/NetworkConfigRouterOS.php

    r873 r874  
    7272    if (IsInternetAddr($IPAddress)) {
    7373      $Output .= '<p>Internet zdarma je dostupný pouze z vnitřní sítě.</p>';
    74       return ($Output);
     74      return $Output;
    7575    }
    7676    $Time = time();
     
    111111      else $Output .= '<a href="?a=activate">Aktivovat</a>';
    112112
    113     return ($Output);
     113    return $Output;
    114114  }
    115115}
     
    135135    $Routerboard->ExecuteBatch(implode(';', $Commands));
    136136
    137     return ($Output);
     137    return $Output;
    138138  }
    139139}
  • trunk/Modules/NetworkConfigRouterOS/Routerboard.php

    r873 r874  
    4141    } else
    4242      $Output = array_merge($Output, $this->ExecuteBatch($Commands));
    43     return ($Output);
     43    return $Output;
    4444  }
    4545
     
    6262    } else $Output = '';
    6363    if ($this->Debug) print_r($Output);
    64     return ($Output);
     64    return $Output;
    6565  }
    6666
     
    7979      } else $List[substr($ResultLineParts[0], 0, -1)] = '';
    8080    }
    81     return ($List);
     81    return $List;
    8282  }
    8383
     
    113113      $List[] = $ListItem;
    114114    }
    115     return ($List);
     115    return $List;
    116116  }
    117117
     
    148148      if (count($ListItem) > 0) $List[] = $ListItem;
    149149    }
    150     return ($List);
     150    return $List;
    151151  }
    152152
     
    244244    }
    245245    if ($this->Debug) print_r($Commands);
    246     return ($this->Execute($Commands));
     246    return $this->Execute($Commands);
    247247  }
    248248}
  • trunk/Modules/NetworkConfigRouterOS/Routerboard2.php

    r873 r874  
    1414  {
    1515    if (is_array($Commands)) $Commands = implode(';', $Commands);
    16     return (parent::Execute($Commands));
     16    return parent::Execute($Commands);
    1717  }
    1818
     
    2828      $List[substr($ResultLineParts[0], 0, -1)] = $ResultLineParts[1];
    2929    }
    30     return ($List);
     30    return $List;
    3131  }
    3232
     
    5252      $List[] = $ListItem;
    5353    }
    54     return ($List);
     54    return $List;
    5555  }
    5656
    5757  function GetSystemResource()
    5858  {
    59     return ($this->GetItem('/system resource print'));
     59    return $this->GetItem('/system resource print');
    6060  }
    6161
    6262  function GetFirewallFilterList()
    6363  {
    64     return ($this->GetList('/ip firewall nat', array('src-address', 'dst-address', 'bytes')));
     64    return $this->GetList('/ip firewall nat', array('src-address', 'dst-address', 'bytes'));
    6565  }
    6666
    6767  function GetDHCPServerLeasesList()
    6868  {
    69     return ($this->GetList('/ip dhcp-server lease', array('address', 'active-address', 'comment', 'lease-time', 'status', 'host-name')));
     69    return $this->GetList('/ip dhcp-server lease', array('address', 'active-address', 'comment', 'lease-time', 'status', 'host-name'));
    7070  }
    7171}
  • trunk/Modules/NetworkConfigRouterOS/RouterboardAPI.php

    r873 r874  
    4040    } else if ($Length >= 0x10000000)
    4141      $Length = chr(0xF0).chr(($Length >> 24) & 0xFF).chr(($Length >> 16) & 0xFF).chr(($Length >> 8) & 0xFF).chr($Length & 0xFF);
    42     return ($Length);
     42    return $Length;
    4343  }
    4444
     
    7171      sleep($this->Delay);
    7272    }
    73     return ($this->Connected);
     73    return $this->Connected;
    7474  }
    7575
     
    234234      $this->Write($el, $Last);
    235235    }
    236     return ($this->Read());
     236    return $this->Read();
    237237  }
    238238}
  • trunk/Modules/NetworkConfigRouterOS/SSH.php

    r873 r874  
    5454    }
    5555    echo($Response);
    56     return (explode("\n", substr($Response, 0, -1)));
     56    return explode("\n", substr($Response, 0, -1));
    5757  }
    5858}
Note: See TracChangeset for help on using the changeset viewer.