From 8e33c0791c414fbd2c159f4462156312fa33811d Mon Sep 17 00:00:00 2001 From: Paul Rock Date: Sat, 20 Jul 2019 15:27:30 +0300 Subject: [PATCH] tune of ClientInterface, short methods removed --- src/Interfaces/ClientInterface.php | 44 ++++++-------------------------------- 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/src/Interfaces/ClientInterface.php b/src/Interfaces/ClientInterface.php index 609dabf..a87e4c6 100644 --- a/src/Interfaces/ClientInterface.php +++ b/src/Interfaces/ClientInterface.php @@ -2,9 +2,6 @@ namespace RouterOS\Interfaces; -use RouterOS\Client; -use RouterOS\Query; - /** * Interface ClientInterface * @@ -51,50 +48,23 @@ interface ClientInterface /** * Return socket resource if is exist * - * @return resource + * @return resource */ public function getSocket(); /** * Read answer from server after query was executed * - * @param bool $parse - * @return array + * @param bool $parse + * @return mixed */ - public function read(bool $parse = true): array; + public function read(bool $parse = true); /** * Send write query to RouterOS (with or without tag) * - * @param string|array|\RouterOS\Query $query - * @return \RouterOS\Client - */ - public function write($query): Client; - - /** - * Alias for ->read() method - * - * @param bool $parse - * @return array - * @since 0.7 - */ - public function r(bool $parse = true): array; - - /** - * Alias for ->write() method - * - * @param string|array|\RouterOS\Query $query - * @return \RouterOS\Client - */ - public function w($query): Client; - - /** - * Alias for ->write()->read() combination of methods - * - * @param string|array|\RouterOS\Query $query - * @param bool $parse - * @return array - * @since 0.6 + * @param string|array|\RouterOS\Query $query + * @return \RouterOS\Interfaces\ClientInterface */ - public function wr($query, bool $parse = true): array; + public function write($query): self; }