From 2350bee24233083e0d0ed944e23afaa89ba14d5f Mon Sep 17 00:00:00 2001 From: Paul Rock Date: Thu, 14 Feb 2019 04:30:16 +0300 Subject: [PATCH] codeclimate updated, new example added --- .codeclimate.yml | 4 ++-- examples/queue_simple_print.php | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 7d40ed6..17520ae 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -1,3 +1,3 @@ excluded_paths: - - "examples/" - - "tests/" +- "examples/" +- "tests/" diff --git a/examples/queue_simple_print.php b/examples/queue_simple_print.php index 7d3deed..f827487 100644 --- a/examples/queue_simple_print.php +++ b/examples/queue_simple_print.php @@ -14,13 +14,17 @@ $client = new Client([ 'pass' => 'admin' ]); -// Build query -$query = new Query('/ip/address/print'); +$ips = [ + '192.168.1.1', + '192.168.1.2', + '192.168.1.3', + '192.168.1.4', + '192.168.1.5', + '192.168.1.6', +]; -for ($i = 0; $i < 100; $i++) { - // Send query to RouterOS - $response = $client->write($query)->read(); +foreach ($ips as $ip) { + $query = new Query('/queue/simple/print', ['?target=' . $ip . '/32']); + $response = $client->wr($query); print_r($response); } - -$query = new Query('/queue/simple/print');