1 | <?php |
||
2 | use PEAR2\Net\RouterOS; |
||
3 | |||
4 | require_once 'PEAR2/Autoload.php'; |
||
5 | |||
6 | try { |
||
7 | $client = new RouterOS\Client('192.168.88.1', 'admin', 'password'); |
||
8 | } catch (Exception $e) { |
||
9 | die('Unable to connect to the router.'); |
||
10 | } |
||
11 | |||
12 | $addRequest = new RouterOS\Request('/ip/arp/add'); |
||
13 | |||
14 | $addRequest->setArgument('address', '192.168.88.100'); |
||
15 | $addRequest->setArgument('mac-address', '00:00:00:00:00:01'); |
||
16 | if ($client->sendSync($addRequest)->getType() !== Response::TYPE_FINAL) { |
||
0 ignored issues
–
show
|
|||
17 | die("Error when creating ARP entry for '192.168.0.100'"); |
||
18 | } |
||
19 | |||
20 | $addRequest->setArgument('address', '192.168.88.101'); |
||
21 | $addRequest->setArgument('mac-address', '00:00:00:00:00:02'); |
||
22 | if ($client->sendSync($addRequest)->getType() !== Response::TYPE_FINAL) { |
||
23 | die("Error when creating ARP entry for '192.168.0.101'"); |
||
24 | } |
||
25 | |||
26 | echo 'OK'; |
||
27 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths