Completed
Push — master ( 8fdf1d...0086b6 )
by Mr
06:52
created
configs/routeros-api.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
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)
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 21
 
22 22
     /*
23 23
      |--------------------------------------------------------------------------
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
      |
31 31
      */
32 32
 
33
-    'attempts'        => 10,   // Count of attempts to establish TCP session
34
-    'delay'           => 1,    // Delay between attempts in seconds
35
-    'timeout'         => 10,   // Max timeout for instantiating connection with RouterOS
36
-    'socket_timeout'  => 30,   // Max timeout for read from RouterOS
33
+    'attempts'        => 10, // Count of attempts to establish TCP session
34
+    'delay'           => 1, // Delay between attempts in seconds
35
+    'timeout'         => 10, // Max timeout for instantiating connection with RouterOS
36
+    'socket_timeout'  => 30, // Max timeout for read from RouterOS
37 37
     'socket_blocking' => true, // Set blocking mode on a socket stream
38 38
 
39 39
     // @see https://www.php.net/manual/en/context.socket.php
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
     // @see https://www.php.net/manual/en/context.ssl.php
67 67
     'ssl_options' => [
68 68
         'ciphers'           => 'ADH:ALL', // ADH:ALL, ADH:ALL@SECLEVEL=0, ADH:ALL@SECLEVEL=1 ... ADH:ALL@SECLEVEL=5
69
-        'verify_peer'       => false,     // Require verification of SSL certificate used.
70
-        'verify_peer_name'  => false,     // Require verification of peer name.
71
-        'allow_self_signed' => false,     // Allow self-signed certificates. Requires verify_peer=true.
69
+        'verify_peer'       => false, // Require verification of SSL certificate used.
70
+        'verify_peer_name'  => false, // Require verification of peer name.
71
+        'allow_self_signed' => false, // Allow self-signed certificates. Requires verify_peer=true.
72 72
     ],
73 73
 
74 74
     /*
Please login to merge, or discard this patch.
src/Config.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -124,17 +124,17 @@
 block discarded – undo
124 124
      * List of allowed parameters of config
125 125
      */
126 126
     public const ALLOWED = [
127
-        'host'            => 'string',  // Address of Mikrotik RouterOS
128
-        'user'            => 'string',  // Username
129
-        'pass'            => 'string',  // Password
127
+        'host'            => 'string', // Address of Mikrotik RouterOS
128
+        'user'            => 'string', // Username
129
+        'pass'            => 'string', // Password
130 130
         'port'            => 'integer', // RouterOS API port number for access (if not set use default or default with SSL if SSL enabled)
131 131
         'ssl'             => 'boolean', // Enable ssl support (if port is not set this parameter must change default port to ssl port)
132
-        'ssl_options'     => 'array',   // List of SSL options, eg.
132
+        'ssl_options'     => 'array', // List of SSL options, eg.
133 133
         'legacy'          => 'boolean', // Support of legacy login scheme (true - pre 6.43, false - post 6.43)
134 134
         'timeout'         => 'integer', // Max timeout for instantiating connection with RouterOS
135 135
         'socket_timeout'  => 'integer', // Max timeout for read from RouterOS
136 136
         'socket_blocking' => 'boolean', // Set blocking mode on a socket stream
137
-        'socket_options'  => 'array',   // List of socket context options
137
+        'socket_options'  => 'array', // List of socket context options
138 138
         'attempts'        => 'integer', // Count of attempts to establish TCP session
139 139
         'delay'           => 'integer', // Delay between attempts in seconds
140 140
         'ssh_port'        => 'integer', // Number of SSH port
Please login to merge, or discard this patch.
src/SocketTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         }
60 60
 
61 61
         // Set blocking mode on a stream
62
-        if ($this->config('socket_blocking') === true){
62
+        if ($this->config('socket_blocking') === true) {
63 63
             stream_set_blocking($socketClient, true);
64 64
         }
65 65
 
Please login to merge, or discard this patch.