@@ -43,14 +43,14 @@ |
||
| 43 | 43 | if (($value & $mask) || $buffer !== '') { |
| 44 | 44 | // Get the current byte by shifting it to least significant position and add it to the string |
| 45 | 45 | // 0xFF12345678 => 0xFF |
| 46 | - $byte = $value >> (8 * $i); |
|
| 46 | + $byte = $value >> (8 * $i); |
|
| 47 | 47 | $buffer .= chr($byte); |
| 48 | 48 | |
| 49 | 49 | // Set the most significant byte to 0 so we can restart the process being shure |
| 50 | 50 | // that the value is left padded with 0 |
| 51 | 51 | // 0xFF12345678 => 0x12345678 |
| 52 | 52 | // -1 = 0xFFFFF.... (number of F depend of PHP_INT_SIZE ) |
| 53 | - $mask = -1 >> ((PHP_INT_SIZE - $i) * 8); |
|
| 53 | + $mask = -1 >> ((PHP_INT_SIZE - $i) * 8); |
|
| 54 | 54 | $value &= $mask; |
| 55 | 55 | } |
| 56 | 56 | } |
@@ -46,9 +46,9 @@ |
||
| 46 | 46 | * List of available operators for "->where()" method |
| 47 | 47 | */ |
| 48 | 48 | public const AVAILABLE_OPERATORS = [ |
| 49 | - '-', // Does not have |
|
| 50 | - '=', // Equal |
|
| 51 | - '>', // More than |
|
| 49 | + '-', // Does not have |
|
| 50 | + '=', // Equal |
|
| 51 | + '>', // More than |
|
| 52 | 52 | '<' // Less than |
| 53 | 53 | ]; |
| 54 | 54 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | /** |
| 54 | 54 | * Client constructor. |
| 55 | 55 | * |
| 56 | - * @param array|\RouterOS\Interfaces\ConfigInterface $config Array with configuration or Config object |
|
| 56 | + * @param Interfaces\ConfigInterface $config Array with configuration or Config object |
|
| 57 | 57 | * @param bool $autoConnect If false it will skip auto-connect stage if not need to instantiate connection |
| 58 | 58 | * |
| 59 | 59 | * @throws \RouterOS\Exceptions\ClientException |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | * @param string $value Value which should be parsed |
| 402 | 402 | * @param array $result Array with parsed response |
| 403 | 403 | * @param null|array $matches Matched words |
| 404 | - * @param string|int $iterator Type of iterations or number of item |
|
| 404 | + * @param integer $iterator Type of iterations or number of item |
|
| 405 | 405 | */ |
| 406 | 406 | private function preParseResponse(string $value, array &$result, ?array &$matches, $iterator = 'after'): void |
| 407 | 407 | { |
@@ -15,11 +15,11 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | 'host' => '192.168.88.1', // Address of Mikrotik RouterOS |
| 18 | - 'user' => 'admin', // Username |
|
| 19 | - 'pass' => null, // Password |
|
| 20 | - 'port' => 8728, // RouterOS API port number for access (if not set use default or default with SSL if SSL enabled) |
|
| 21 | - 'ssl' => false, // Enable ssl support (if port is not set this parameter must change default port to ssl port) |
|
| 22 | - 'ssh_port' => 22, // Number of SSH port |
|
| 18 | + 'user' => 'admin', // Username |
|
| 19 | + 'pass' => null, // Password |
|
| 20 | + 'port' => 8728, // RouterOS API port number for access (if not set use default or default with SSL if SSL enabled) |
|
| 21 | + 'ssl' => false, // Enable ssl support (if port is not set this parameter must change default port to ssl port) |
|
| 22 | + 'ssh_port' => 22, // Number of SSH port |
|
| 23 | 23 | |
| 24 | 24 | /* |
| 25 | 25 | |-------------------------------------------------------------------------- |
@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | |
| 34 | 34 | 'legacy' => false, // Support of legacy login scheme (true - pre 6.43, false - post 6.43) |
| 35 | - 'timeout' => 10, // Max timeout for answer from RouterOS |
|
| 36 | - 'attempts' => 10, // Count of attempts to establish TCP session |
|
| 37 | - 'delay' => 1, // Delay between attempts in seconds |
|
| 35 | + 'timeout' => 10, // Max timeout for answer from RouterOS |
|
| 36 | + 'attempts' => 10, // Count of attempts to establish TCP session |
|
| 37 | + 'delay' => 1, // Delay between attempts in seconds |
|
| 38 | 38 | |
| 39 | 39 | ]; |
@@ -60,9 +60,9 @@ |
||
| 60 | 60 | * List of allowed parameters of config |
| 61 | 61 | */ |
| 62 | 62 | public const ALLOWED = [ |
| 63 | - 'host' => 'string', // Address of Mikrotik RouterOS |
|
| 64 | - 'user' => 'string', // Username |
|
| 65 | - 'pass' => 'string', // Password |
|
| 63 | + 'host' => 'string', // Address of Mikrotik RouterOS |
|
| 64 | + 'user' => 'string', // Username |
|
| 65 | + 'pass' => 'string', // Password |
|
| 66 | 66 | 'port' => 'integer', // RouterOS API port number for access (if not set use default or default with SSL if SSL enabled) |
| 67 | 67 | 'ssl' => 'boolean', // Enable ssl support (if port is not set this parameter must change default port to ssl port) |
| 68 | 68 | 'legacy' => 'boolean', // Support of legacy login scheme (true - pre 6.43, false - post 6.43) |