From 5973350a55c598fddd768c7e1073fa799059f612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=BB=A5=E8=BE=BE?= <> Date: Mon, 13 Apr 2020 13:45:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96=E7=B1=BB=E5=90=8D?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99=E3=80=82=E4=BC=98=E5=8C=96=E6=89=80?= =?UTF-8?q?=E6=9C=89=E6=96=AD=E8=A1=8C=E7=A9=BA=E6=A0=BC=E4=BB=A5=E7=AC=A6?= =?UTF-8?q?=E5=90=88psr-4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 + README.md | 3 +- composer.json | 3 +- composer.lock | 1855 +++++++++++++++++ src/Acl.php | 4 +- src/Agent.php | 5 +- src/BaseFunc.php | 15 +- src/Catalog.php | 8 +- src/Config.php | 16 +- src/Connect.php | 1 - src/Consul.php | 48 +- src/ConsulConfig.php | 2 +- src/ConsulInterface/AclInterface.php | 2 +- src/ConsulInterface/AgentInterface.php | 2 +- src/ConsulInterface/CatalogInterface.php | 2 +- src/ConsulInterface/ConnectInterface.php | 2 +- src/ConsulInterface/ConsulConfigInterface.php | 2 +- src/ConsulInterface/CoordinatesInterface.php | 2 +- src/ConsulInterface/EventInterface.php | 2 +- src/ConsulInterface/HealthInterface.php | 2 +- src/ConsulInterface/KVStoreInterface.php | 2 +- src/ConsulInterface/OperatorInterface.php | 2 +- src/ConsulInterface/QueryInterface.php | 2 +- src/ConsulInterface/SessionInterface.php | 2 +- src/ConsulInterface/SnapshotInterface.php | 2 +- src/ConsulInterface/StatusInterface.php | 4 +- src/ConsulInterface/TransactionInterface.php | 2 +- src/Coordinates.php | 6 +- src/Event.php | 2 +- src/Exception/Exception.php | 6 +- .../InvalidRequiredParamsException.php | 3 +- .../MissingRequiredParamsException.php | 3 +- src/KVStore.php | 5 +- src/Operator.php | 2 +- src/Query.php | 2 +- src/Request/Acl/AuthMethod.php | 20 +- src/Request/Acl/AuthMethods.php | 2 +- src/Request/Acl/BindingRule.php | 28 +- src/Request/Acl/BindingRules.php | 21 +- src/Request/Acl/Bootstrap.php | 2 +- src/Request/Acl/CloneACLToken.php | 2 +- src/Request/Acl/Create.php | 20 +- src/Request/Acl/Destroy.php | 2 +- src/Request/Acl/Info.php | 2 +- src/Request/Acl/Lists.php | 2 +- src/Request/Acl/Login.php | 16 +- src/Request/Acl/Logout.php | 6 +- src/Request/Acl/Policies.php | 2 +- src/Request/Acl/Policy.php | 25 +- src/Request/Acl/Replication.php | 2 +- src/Request/Acl/Role.php | 24 +- src/Request/Acl/Role/Name.php | 2 +- src/Request/Acl/Roles.php | 2 +- src/Request/Acl/Token.php | 40 +- src/Request/Acl/Token/CloneToken.php | 21 +- src/Request/Acl/Token/GetSelf.php | 6 +- src/Request/Acl/Tokens.php | 6 +- src/Request/Acl/Translate.php | 6 +- src/Request/Acl/Update.php | 20 +- src/Request/Agent/Check/Deregister.php | 2 +- src/Request/Agent/Check/Fail.php | 2 +- src/Request/Agent/Check/Pass.php | 2 +- src/Request/Agent/Check/Register.php | 88 +- src/Request/Agent/Check/Update.php | 13 +- src/Request/Agent/Check/Warn.php | 2 +- src/Request/Agent/Checks.php | 2 +- src/Request/Agent/Connect/Authorize.php | 16 +- src/Request/Agent/Connect/ca/Leaf.php | 8 +- src/Request/Agent/Connect/ca/Roots.php | 2 +- src/Request/Agent/ForceLeave.php | 2 +- src/Request/Agent/Health/Service/ID.php | 2 +- src/Request/Agent/Health/Service/Name.php | 2 +- src/Request/Agent/Join.php | 2 +- src/Request/Agent/Leave.php | 2 +- src/Request/Agent/Maintenance.php | 2 +- src/Request/Agent/Members.php | 2 +- src/Request/Agent/Metrics.php | 2 +- src/Request/Agent/Monitor.php | 2 +- src/Request/Agent/Reload.php | 2 +- src/Request/Agent/SelfParams.php | 2 +- src/Request/Agent/Service.php | 2 +- src/Request/Agent/Service/Deregister.php | 2 +- src/Request/Agent/Service/Maintenance.php | 2 +- src/Request/Agent/Service/Register.php | 64 +- src/Request/Agent/Services.php | 5 +- src/Request/Agent/Token.php | 4 +- src/Request/BaseCommand.php | 7 +- src/Request/Catalog/Connect.php | 2 +- src/Request/Catalog/Datacenters.php | 4 +- src/Request/Catalog/Deregister.php | 22 +- src/Request/Catalog/Node.php | 2 +- src/Request/Catalog/Nodes.php | 4 +- src/Request/Catalog/Register.php | 40 +- src/Request/Catalog/Service.php | 2 +- src/Request/Catalog/Services.php | 3 +- src/Request/Config.php | 16 +- src/Request/Connect/Ca/Configuration.php | 12 +- src/Request/Connect/Ca/Roots.php | 2 +- src/Request/Connect/Intentions.php | 30 +- src/Request/Connect/Intentions/Check.php | 2 +- src/Request/Connect/Intentions/Match.php | 2 +- src/Request/Coordinate/Datacenters.php | 4 +- src/Request/Coordinate/Node.php | 3 +- src/Request/Coordinate/Nodes.php | 2 +- src/Request/Coordinate/Update.php | 20 +- src/Request/Event/Fire.php | 2 +- src/Request/Event/ListEvent.php | 2 +- src/Request/Health/Checks.php | 2 +- src/Request/Health/Connect.php | 2 +- src/Request/Health/Node.php | 2 +- src/Request/Health/Service.php | 2 +- src/Request/Health/State.php | 2 +- src/Request/Kv.php | 6 +- src/Request/Operator/Area.php | 24 +- .../Operator/Autopilot/Configuration.php | 34 +- src/Request/Operator/Autopilot/Health.php | 2 +- src/Request/Operator/Keyring.php | 6 +- src/Request/Operator/License.php | 2 +- src/Request/Operator/Raft/Configuration.php | 2 +- src/Request/Operator/Raft/Peer.php | 2 +- src/Request/Operator/Segment.php | 2 +- src/Request/Query.php | 32 +- src/Request/Query/Execute.php | 2 +- src/Request/Query/Explain.php | 2 +- src/Request/Session/Create.php | 32 +- src/Request/Session/Destroy.php | 2 +- src/Request/Session/Info.php | 2 +- src/Request/Session/Node.php | 2 +- src/Request/Session/Renew.php | 2 +- src/Request/Session/SessionList.php | 2 +- src/Request/Snapshot.php | 2 +- src/Request/Status/Leader.php | 2 +- src/Request/Status/Peers.php | 2 +- src/Request/Txn.php | 24 +- src/Session.php | 2 +- src/Snapshot.php | 5 +- src/Status.php | 2 +- src/Transaction.php | 2 +- tests/AclTest.php | 164 +- tests/AgentTest.php | 120 +- tests/CatalogTest.php | 65 +- tests/ConnectTest.php | 44 +- tests/ConsulConfigTest.php | 20 +- tests/CoordinateTest.php | 25 +- tests/EventTest.php | 12 +- tests/HealthTest.php | 25 +- tests/KvStoreTest.php | 20 +- tests/OperatorTest.php | 80 +- tests/QueryTest.php | 28 +- tests/SessionTest.php | 28 +- tests/SnapshotTest.php | 13 +- tests/StatusTest.php | 13 +- tests/TxnTest.php | 9 +- 153 files changed, 2718 insertions(+), 882 deletions(-) create mode 100644 .gitignore create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..888ec56 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/vendor/* +/.idea +dump.rdb +.idea/* diff --git a/README.md b/README.md index 22f71af..777a162 100644 --- a/README.md +++ b/README.md @@ -847,7 +847,8 @@ $update = new kv([ 'key' => 'my-key', 'dc' => 'dc1', ]); -$this->consul->kvStore()->update($update); +$this->consul-> +($update); // Delete Key $delete = new Kv([ diff --git a/composer.json b/composer.json index 83507f9..5b183ff 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "easyswoole/http-client": "^1.2.5" }, "require-dev": { - "easyswoole/phpunit": "^1.0" + "easyswoole/phpunit": "^1.0", + "easyswoole/swoole-ide-helper": "^1.1" } } \ No newline at end of file diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..1cd4017 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1855 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "b333bf5f73dec035896166be87ea4ece", + "packages": [ + { + "name": "easyswoole/http-client", + "version": "1.3.11", + "source": { + "type": "git", + "url": "https://github.com/easy-swoole/http-client.git", + "reference": "2e1a16346f1a9007b389af381135d8fb2e44eddf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/easy-swoole/http-client/zipball/2e1a16346f1a9007b389af381135d8fb2e44eddf", + "reference": "2e1a16346f1a9007b389af381135d8fb2e44eddf", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "easyswoole/spl": "^1.1", + "php": ">=7.1.0" + }, + "require-dev": { + "easyswoole/phpunit": "^1.0", + "easyswoole/swoole-ide-helper": "^1.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "EasySwoole\\HttpClient\\": "src/", + "EasySwoole\\HttpClient\\Test\\": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "YF", + "email": "291323003@qq.com" + } + ], + "description": "php stander lib", + "homepage": "https://www.easyswoole.com/", + "keywords": [ + "async", + "easyswoole", + "framework", + "swoole" + ], + "time": "2020-01-13T01:56:10+00:00" + }, + { + "name": "easyswoole/spl", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/easy-swoole/spl.git", + "reference": "d0fb72ee0a9febf64a241ebc1cbcaad47d657570" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/easy-swoole/spl/zipball/d0fb72ee0a9febf64a241ebc1cbcaad47d657570", + "reference": "d0fb72ee0a9febf64a241ebc1cbcaad47d657570", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=7.1.0" + }, + "require-dev": { + "easyswoole/phpunit": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "EasySwoole\\Spl\\": "src/", + "EasySwoole\\Spl\\Test\\": "test/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "YF", + "email": "291323003@qq.com" + } + ], + "description": "php stander lib", + "homepage": "https://www.easyswoole.com/", + "keywords": [ + "async", + "easyswoole", + "framework", + "swoole" + ], + "time": "2019-12-11T03:16:51+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/ae466f726242e637cebdd526a7d991b9433bacf1", + "reference": "ae466f726242e637cebdd526a7d991b9433bacf1", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2019-10-21T16:45:58+00:00" + }, + { + "name": "easyswoole/phpunit", + "version": "1.0.7", + "source": { + "type": "git", + "url": "https://github.com/easy-swoole/phpunit.git", + "reference": "9dcbd763186a746e2d5b59110a060e1968244152" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/easy-swoole/phpunit/zipball/9dcbd763186a746e2d5b59110a060e1968244152", + "reference": "9dcbd763186a746e2d5b59110a060e1968244152", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-swoole": "^4.4.0", + "phpunit/phpunit": "^7.5" + }, + "bin": [ + "bin/co-phpunit" + ], + "type": "library", + "autoload": { + "psr-4": { + "EasySwoole\\Phpunit\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "YF", + "email": "291323003@qq.com" + } + ], + "description": "An efficient swoole framework", + "homepage": "https://www.easyswoole.com/", + "keywords": [ + "async", + "easyswoole", + "framework", + "swoole" + ], + "time": "2019-07-28T15:36:45+00:00" + }, + { + "name": "easyswoole/swoole-ide-helper", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/easy-swoole/ide-helper.git", + "reference": "e759aeaa9bc89852a42c610d94ce4c65e6f5b8cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/easy-swoole/ide-helper/zipball/e759aeaa9bc89852a42c610d94ce4c65e6f5b8cf", + "reference": "e759aeaa9bc89852a42c610d94ce4c65e6f5b8cf", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require-dev": { + "squizlabs/php_codesniffer": "~3.4.0", + "zendframework/zend-code": "~3.3.0" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Team Swoole", + "email": "team@swoole.com" + } + ], + "description": "IDE help files for Swoole.", + "time": "2019-09-06T15:31:56+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.9.5", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/b2c28789e80a97badd14145fda39b545d83ca3ef", + "reference": "b2c28789e80a97badd14145fda39b545d83ca3ef", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2020-01-17T21:11:47+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^2.0", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2018-07-08T19:23:20+00:00" + }, + { + "name": "phar-io/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2018-07-08T19:19:57+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", + "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2018-08-07T13:53:10+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.4", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", + "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", + "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "^1.0.5", + "mockery/mockery": "^1.0", + "phpdocumentor/type-resolver": "0.4.*", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2019-12-28T18:55:12+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "^7.1", + "mockery/mockery": "~1", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2019-08-22T18:11:29+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.10.2", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "reference": "b4400efc9d206e83138e2bb97ed7f5b14b831cd9", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2020-01-20T15:57:02+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "6.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.1", + "phpunit/php-file-iterator": "^2.0", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.1 || ^4.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "suggest": { + "ext-xdebug": "^2.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2018-10-31T16:06:48+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "050bedf145a257b1ff02746c31894800e5122946" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946", + "reference": "050bedf145a257b1ff02746c31894800e5122946", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2018-09-13T20:33:42+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e", + "reference": "1038454804406b0b5f5f520358e78c1c2f71501e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2019-06-07T04:22:29+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/995192df77f63a59e47f025390d2d1fdf8f425ff", + "reference": "995192df77f63a59e47f025390d2d1fdf8f425ff", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2019-09-17T06:23:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "7.5.20", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", + "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "doctrine/instantiator": "^1.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.7", + "phar-io/manifest": "^1.0.2", + "phar-io/version": "^2.0", + "php": "^7.1", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^6.0.7", + "phpunit/php-file-iterator": "^2.0.1", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1", + "sebastian/comparator": "^3.0", + "sebastian/diff": "^3.0", + "sebastian/environment": "^4.0", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpunit/phpunit-mock-objects": "*" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2020-01-08T08:45:45+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2018-07-12T15:12:46+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "time": "2019-02-04T06:01:07+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.2.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "reference": "464c90d7bdf5ad4e8a6aea15c091fec0603d4368", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2019-11-20T08:46:58+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2019-09-14T09:02:43+00:00" + }, + { + "name": "sebastian/global-state", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2018-10-04T04:07:39+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.13.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.13-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-11-27T13:56:44+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2019-06-13T22:48:21+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", + "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "vimeo/psalm": "<3.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2019-11-24T13:36:37+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/src/Acl.php b/src/Acl.php index 7ed4781..5cede99 100644 --- a/src/Acl.php +++ b/src/Acl.php @@ -378,7 +378,7 @@ public function deletePolicy(Policy $policy) * @return mixed * @throws \EasySwoole\HttpClient\Exception\InvalidUrl */ - public function policies (Policies $policies) + public function policies(Policies $policies) { return $this->getJson($policies); } @@ -656,4 +656,4 @@ public function bindingRules(BindingRules $bindingRules) { return $this->getJson($bindingRules); } -} \ No newline at end of file +} diff --git a/src/Agent.php b/src/Agent.php index 9fc5eab..e8dc44c 100644 --- a/src/Agent.php +++ b/src/Agent.php @@ -76,7 +76,7 @@ public function maintenance(Maintenance $maintenance) if (empty($maintenance->getEnable())) { throw new MissingRequiredParamsException('Missing the required param: enable.'); } - return $this->putJSON($maintenance , false); + return $this->putJSON($maintenance, false); } /** @@ -139,7 +139,6 @@ public function leave(Leave $leave) * @throws \EasySwoole\HttpClient\Exception\InvalidUrl */ public function forceLeave(ForceLeave $forceLeave) - { if (empty($forceLeave->getNode())) { throw new MissingRequiredParamsException('Missing the required param: node.'); @@ -456,4 +455,4 @@ public function leaf(Leaf $leaf) $leaf->setService(''); return $this->getJson($leaf); } -} \ No newline at end of file +} diff --git a/src/BaseFunc.php b/src/BaseFunc.php index e78a0d3..8f4330b 100644 --- a/src/BaseFunc.php +++ b/src/BaseFunc.php @@ -42,7 +42,7 @@ protected function putJSON(BaseCommand $bean, $isJsonParams = true) $http = new HttpClient($url); if ($http) { - try{ + try { return $this->checkResponse($http->put($data)); } catch (\Exception $exception) { throw new \Exception($exception->getMessage()); @@ -67,7 +67,7 @@ protected function getJson(BaseCommand $bean, array $headers = []) $http = new HttpClient($url); if ($http) { - try{ + try { if (isset($headers) && !empty($headers)) { foreach ($headers as $headerKey => $headerVal) { $http->setHeader($headerKey, $headerVal); @@ -96,7 +96,7 @@ protected function postJson(BaseCommand $bean, array $headers = []) $http = new HttpClient($url); if ($http) { - try{ + try { if (isset($headers) && !empty($headers)) { foreach ($headers as $headerKey => $headerVal) { $http->setHeader($headerKey, $headerVal); @@ -118,14 +118,14 @@ protected function postJson(BaseCommand $bean, array $headers = []) * @throws InvalidUrl * @throws \Exception */ - protected function deleteJson(BaseCommand $bean, array $headers=[]) + protected function deleteJson(BaseCommand $bean, array $headers = []) { $url = $this->getUrl($bean); $data = $this->toRequestParam($bean); $url = $data ? $url . '?' . $data : $url; $http = new HttpClient($url); if ($http) { - try{ + try { if (isset($headers) && !empty($headers)) { foreach ($headers as $headerKey => $headerVal) { $http->setHeader($headerKey, $headerVal); @@ -145,7 +145,8 @@ protected function deleteJson(BaseCommand $bean, array $headers=[]) * @return mixed * @throws Exception */ - private function checkResponse(Response $consulResponse) { + private function checkResponse(Response $consulResponse) + { // 网络响应失败 if ($consulResponse->getErrCode()) { throw new Exception('Consul Network Error: ' . $consulResponse->getErrMsg()); @@ -205,4 +206,4 @@ private function toRequestJson(BaseCommand $request): ?string return $data ? json_encode($data) : null; } -} \ No newline at end of file +} diff --git a/src/Catalog.php b/src/Catalog.php index 4d979d5..3b340a1 100644 --- a/src/Catalog.php +++ b/src/Catalog.php @@ -5,7 +5,7 @@ use EasySwoole\Consul\Exception\MissingRequiredParamsException; use EasySwoole\Consul\Request\Catalog\Connect; use EasySwoole\Consul\Request\Catalog\Datacenters; -use EasySwoole\Consul\Request\Catalog\Deregister; +use EasySwoole\Consul\Request\Catalog\DeRegister; use EasySwoole\Consul\Request\Catalog\Node; use EasySwoole\Consul\Request\Catalog\Nodes; use EasySwoole\Consul\Request\Catalog\Register; @@ -40,7 +40,7 @@ public function register(Register $register) * @throws MissingRequiredParamsException * @throws \EasySwoole\HttpClient\Exception\InvalidUrl */ - public function deRegister(Deregister $deregister) + public function deRegister(DeRegister $deregister) { if (empty($deregister->getNode())) { throw new MissingRequiredParamsException('Missing the required param: Node.'); @@ -54,7 +54,7 @@ public function deRegister(Deregister $deregister) * @return mixed * @throws \EasySwoole\HttpClient\Exception\InvalidUrl */ - public function dataCenters(Datacenters $datacenters) + public function dataCenters(DataCenters $datacenters) { return $this->getJson($datacenters); } @@ -131,4 +131,4 @@ public function node(Node $node) $node->setNode(''); return $this->getJson($node); } -} \ No newline at end of file +} diff --git a/src/Config.php b/src/Config.php index 533f3df..61a6ae0 100644 --- a/src/Config.php +++ b/src/Config.php @@ -2,7 +2,6 @@ namespace EasySwoole\Consul; use EasySwoole\Spl\SplBean; -use PhpParser\Node\Scalar\String_; /** * 初始化 consul接口的ip:port/controller信息。不包含对应的action,param @@ -27,7 +26,7 @@ class Config extends SplBean /** * @return string */ - public function getIP () + public function getIP() { return $this->IP; } @@ -35,7 +34,7 @@ public function getIP () /** * @param string $IP */ - public function setIP ($IP) + public function setIP($IP) { $this->IP = $IP; } @@ -43,7 +42,7 @@ public function setIP ($IP) /** * @return string */ - public function getPort () + public function getPort() { return $this->port; } @@ -51,7 +50,7 @@ public function getPort () /** * @param string $port */ - public function setPort ($port) + public function setPort($port) { $this->port = $port; } @@ -59,7 +58,7 @@ public function setPort ($port) /** * @return string */ - public function getVersion () + public function getVersion() { return $this->version; } @@ -67,7 +66,7 @@ public function getVersion () /** * @param string $version */ - public function setVersion ($version) + public function setVersion($version) { $this->version = $version; } @@ -80,5 +79,4 @@ public function __toString() { return $this->IP . ':' . $this->port . '/' . $this->version . '/'; } - -} \ No newline at end of file +} diff --git a/src/Connect.php b/src/Connect.php index b64bca2..eb0b954 100644 --- a/src/Connect.php +++ b/src/Connect.php @@ -7,7 +7,6 @@ */ namespace EasySwoole\Consul; - use EasySwoole\Consul\ConsulInterface\ConnectInterface; use EasySwoole\Consul\Exception\MissingRequiredParamsException; use EasySwoole\Consul\Request\Connect\Ca\Configuration; diff --git a/src/Consul.php b/src/Consul.php index 5039b45..3c62c8a 100644 --- a/src/Consul.php +++ b/src/Consul.php @@ -1,11 +1,6 @@ config = $config; } - - function kvStore():KVStore + public function kvStore():KVStore { - if(empty($this->kvStore)){ + if (empty($this->kvStore)) { $this->kvStore = new KVStore($this->config); } return $this->kvStore; } - function health():Health + public function health():Health { - if(empty($this->health)){ + if (empty($this->health)) { $this->health = new Health($this->config); } return $this->health; } - function catalog():Catalog + public function catalog():Catalog { - if(empty($this->catalog)){ + if (empty($this->catalog)) { $this->catalog = new Catalog($this->config); } return $this->catalog; } - function agent():Agent + public function agent():Agent { - if (empty($this->agent)){ + if (empty($this->agent)) { $this->agent = new Agent($this->config); } return $this->agent; } - function acl():Acl + public function acl():Acl { if (empty($this->acl)) { $this->acl = new Acl($this->config); @@ -72,7 +66,7 @@ function acl():Acl return $this->acl; } - function config():ConsulConfig + public function config():ConsulConfig { if (empty($this->consulConfig)) { $this->consulConfig = new ConsulConfig($this->config); @@ -80,7 +74,7 @@ function config():ConsulConfig return $this->consulConfig; } - function connect():Connect + public function connect():Connect { if (empty($this->connect)) { $this->connect = new Connect($this->config); @@ -88,7 +82,7 @@ function connect():Connect return $this->connect; } - function coordinates():Coordinates + public function coordinates():Coordinates { if (empty($this->coordinates)) { $this->coordinates = new Coordinates($this->config); @@ -96,7 +90,7 @@ function coordinates():Coordinates return $this->coordinates; } - function event():Event + public function event():Event { if (empty($this->event)) { $this->event = new Event($this->config); @@ -104,7 +98,7 @@ function event():Event return $this->event; } - function query():Query + public function query():Query { if (empty($this->query)) { $this->query = new Query($this->config); @@ -112,7 +106,7 @@ function query():Query return $this->query; } - function session():Session + public function session():Session { if (empty($this->session)) { $this->session = new Session($this->config); @@ -120,7 +114,7 @@ function session():Session return $this->session; } - function snapshot():Snapshot + public function snapshot():Snapshot { if (empty($this->snapshot)) { $this->snapshot = new Snapshot($this->config); @@ -128,7 +122,7 @@ function snapshot():Snapshot return $this->snapshot; } - function status():Status + public function status():Status { if (empty($this->status)) { $this->status = new Status($this->config); @@ -136,7 +130,7 @@ function status():Status return $this->status; } - function transaction():Transaction + public function transaction():Transaction { if (empty($this->txn)) { $this->txn = new Transaction($this->config); @@ -144,11 +138,11 @@ function transaction():Transaction return $this->txn; } - function operator():Operator + public function operator():Operator { if (empty($this->operator)) { $this->operator = new Operator($this->config); } return $this->operator; } -} \ No newline at end of file +} diff --git a/src/ConsulConfig.php b/src/ConsulConfig.php index 886cdf2..e2c8e79 100644 --- a/src/ConsulConfig.php +++ b/src/ConsulConfig.php @@ -83,4 +83,4 @@ public function deleteConfig(Config $config) $config->setName(''); return $this->deleteJson($config); } -} \ No newline at end of file +} diff --git a/src/ConsulInterface/AclInterface.php b/src/ConsulInterface/AclInterface.php index f5639cc..183a31f 100644 --- a/src/ConsulInterface/AclInterface.php +++ b/src/ConsulInterface/AclInterface.php @@ -108,4 +108,4 @@ public function updateBindingRule(BindingRule $bindingRule); public function deleteBindingRule(BindingRule $bindingRule); public function bindingRules(BindingRules $bindingRules); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/AgentInterface.php b/src/ConsulInterface/AgentInterface.php index e028b92..dcdb561 100644 --- a/src/ConsulInterface/AgentInterface.php +++ b/src/ConsulInterface/AgentInterface.php @@ -87,4 +87,4 @@ public function authorize(Authorize $authorize); public function roots(Roots $roots); public function leaf(Leaf $leaf); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/CatalogInterface.php b/src/ConsulInterface/CatalogInterface.php index 7589d1e..66ecdf2 100644 --- a/src/ConsulInterface/CatalogInterface.php +++ b/src/ConsulInterface/CatalogInterface.php @@ -33,4 +33,4 @@ public function service(Service $service); public function connect(Connect $connect); public function node(Node $node); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/ConnectInterface.php b/src/ConsulInterface/ConnectInterface.php index 8b45075..2afcdc6 100644 --- a/src/ConsulInterface/ConnectInterface.php +++ b/src/ConsulInterface/ConnectInterface.php @@ -32,4 +32,4 @@ public function deleteIntention(Intentions $intentions); public function check(Intentions\Check $check); public function match(Intentions\Match $match); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/ConsulConfigInterface.php b/src/ConsulInterface/ConsulConfigInterface.php index b3ad847..320a046 100644 --- a/src/ConsulInterface/ConsulConfigInterface.php +++ b/src/ConsulInterface/ConsulConfigInterface.php @@ -18,4 +18,4 @@ public function getConfig(Config $config); public function listConfig(Config $config); public function deleteConfig(Config $config); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/CoordinatesInterface.php b/src/ConsulInterface/CoordinatesInterface.php index 5ca54c6..b9af652 100644 --- a/src/ConsulInterface/CoordinatesInterface.php +++ b/src/ConsulInterface/CoordinatesInterface.php @@ -21,4 +21,4 @@ public function nodes(Nodes $nodes); public function node(Node $node); public function update(Update $update); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/EventInterface.php b/src/ConsulInterface/EventInterface.php index 5e89930..2460906 100644 --- a/src/ConsulInterface/EventInterface.php +++ b/src/ConsulInterface/EventInterface.php @@ -15,4 +15,4 @@ interface EventInterface public function fire(Fire $fire); public function listEvent(ListEvent $listEvent); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/HealthInterface.php b/src/ConsulInterface/HealthInterface.php index c80edab..2d73d94 100644 --- a/src/ConsulInterface/HealthInterface.php +++ b/src/ConsulInterface/HealthInterface.php @@ -24,4 +24,4 @@ public function service(Service $service); public function connect(Connect $connect); public function state(State $state); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/KVStoreInterface.php b/src/ConsulInterface/KVStoreInterface.php index 267a621..9ddcb5f 100644 --- a/src/ConsulInterface/KVStoreInterface.php +++ b/src/ConsulInterface/KVStoreInterface.php @@ -18,4 +18,4 @@ public function create(Kv $kv); public function update(Kv $kv); public function delete(Kv $kv); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/OperatorInterface.php b/src/ConsulInterface/OperatorInterface.php index 43be699..69a1732 100644 --- a/src/ConsulInterface/OperatorInterface.php +++ b/src/ConsulInterface/OperatorInterface.php @@ -54,4 +54,4 @@ public function getRaftConfiguration(\EasySwoole\Consul\Request\Operator\Raft\Co public function peer(Peer $peer); public function segment(Segment $segment); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/QueryInterface.php b/src/ConsulInterface/QueryInterface.php index 3404134..e12c845 100644 --- a/src/ConsulInterface/QueryInterface.php +++ b/src/ConsulInterface/QueryInterface.php @@ -24,4 +24,4 @@ public function deleteQuery(Query $query); public function execute(Execute $execute); public function explain(Explain $explain); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/SessionInterface.php b/src/ConsulInterface/SessionInterface.php index b9c595b..6989706 100644 --- a/src/ConsulInterface/SessionInterface.php +++ b/src/ConsulInterface/SessionInterface.php @@ -27,4 +27,4 @@ public function node(Node $node); public function sessionList(SessionList $sessionList); public function renew(Renew $renew); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/SnapshotInterface.php b/src/ConsulInterface/SnapshotInterface.php index dc2ca71..f2e4f19 100644 --- a/src/ConsulInterface/SnapshotInterface.php +++ b/src/ConsulInterface/SnapshotInterface.php @@ -14,4 +14,4 @@ interface SnapshotInterface public function generate(Snapshot $snapshot); public function restore(Snapshot $snapshot); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/StatusInterface.php b/src/ConsulInterface/StatusInterface.php index 22bf7ca..7d26d87 100644 --- a/src/ConsulInterface/StatusInterface.php +++ b/src/ConsulInterface/StatusInterface.php @@ -12,7 +12,7 @@ interface StatusInterface { - public function leader (Leader $leader); + public function leader(Leader $leader); public function peers(Peers $peers); -} \ No newline at end of file +} diff --git a/src/ConsulInterface/TransactionInterface.php b/src/ConsulInterface/TransactionInterface.php index 17f348d..c8607b0 100644 --- a/src/ConsulInterface/TransactionInterface.php +++ b/src/ConsulInterface/TransactionInterface.php @@ -12,4 +12,4 @@ interface TransactionInterface { public function create(Txn $txn); -} \ No newline at end of file +} diff --git a/src/Coordinates.php b/src/Coordinates.php index 35ebe71..5098aa1 100644 --- a/src/Coordinates.php +++ b/src/Coordinates.php @@ -18,11 +18,11 @@ class Coordinates extends BaseFunc implements CoordinatesInterface { /** * Read WAN Coordinates - * @param Datacenters $datacenters + * @param DataCenters $datacenters * @return mixed * @throws \EasySwoole\HttpClient\Exception\InvalidUrl */ - public function datacenters(Datacenters $datacenters) + public function dataCenters(DataCenters $datacenters) { return $this->getJson($datacenters); } @@ -72,4 +72,4 @@ public function update(Update $update) return $this->putJSON($update); } } -} \ No newline at end of file +} diff --git a/src/Event.php b/src/Event.php index b67b02f..9e8e403 100644 --- a/src/Event.php +++ b/src/Event.php @@ -45,4 +45,4 @@ public function listEvent(ListEvent $listEvent) } return $this->getJson($listEvent); } -} \ No newline at end of file +} diff --git a/src/Exception/Exception.php b/src/Exception/Exception.php index d573f7e..6ffb5e8 100644 --- a/src/Exception/Exception.php +++ b/src/Exception/Exception.php @@ -1,10 +1,6 @@ setKey(''); return $this->deleteJson($kv); } -} \ No newline at end of file +} diff --git a/src/Operator.php b/src/Operator.php index 68c6437..5cea103 100644 --- a/src/Operator.php +++ b/src/Operator.php @@ -277,4 +277,4 @@ public function segment(Segment $segment) { return $this->getJson($segment); } -} \ No newline at end of file +} diff --git a/src/Query.php b/src/Query.php index 7ba202f..1a72cfe 100644 --- a/src/Query.php +++ b/src/Query.php @@ -110,4 +110,4 @@ public function explain(Explain $explain) $explain->setUuid(''); return $this->getJson($explain); } -} \ No newline at end of file +} diff --git a/src/Request/Acl/AuthMethod.php b/src/Request/Acl/AuthMethod.php index e9219ba..0c9c110 100644 --- a/src/Request/Acl/AuthMethod.php +++ b/src/Request/Acl/AuthMethod.php @@ -33,7 +33,7 @@ class AuthMethod extends BaseCommand /** * @return string */ - public function getName () + public function getName() { return $this->name; } @@ -41,7 +41,7 @@ public function getName () /** * @param string $name */ - public function setName ($name) + public function setName($name) { $this->name = $name; } @@ -49,7 +49,7 @@ public function setName ($name) /** * @return string */ - public function getType () + public function getType() { return $this->type; } @@ -57,7 +57,7 @@ public function getType () /** * @param string $type */ - public function setType ($type) + public function setType($type) { $this->type = $type; } @@ -65,7 +65,7 @@ public function setType ($type) /** * @return string */ - public function getDescription () + public function getDescription() { return $this->description; } @@ -73,7 +73,7 @@ public function getDescription () /** * @param string $description */ - public function setDescription ($description) + public function setDescription($description) { $this->description = $description; } @@ -81,7 +81,7 @@ public function setDescription ($description) /** * @return string */ - public function getConfig () + public function getConfig() { return $this->config; } @@ -89,12 +89,12 @@ public function getConfig () /** * @param string $config */ - public function setConfig ($config) + public function setConfig($config) { $this->config = json_encode($config); } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'Name' => 'name', @@ -103,4 +103,4 @@ protected function setKeyMapping (): array 'Config' => 'config', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/AuthMethods.php b/src/Request/Acl/AuthMethods.php index fa91153..f510557 100644 --- a/src/Request/Acl/AuthMethods.php +++ b/src/Request/Acl/AuthMethods.php @@ -12,4 +12,4 @@ class AuthMethods extends BaseCommand { protected $url = 'acl/auth-methods'; -} \ No newline at end of file +} diff --git a/src/Request/Acl/BindingRule.php b/src/Request/Acl/BindingRule.php index a9725df..ae501c3 100644 --- a/src/Request/Acl/BindingRule.php +++ b/src/Request/Acl/BindingRule.php @@ -53,7 +53,7 @@ class BindingRule extends BaseCommand /** * @return string */ - public function getId () + public function getId() { return $this->id; } @@ -61,7 +61,7 @@ public function getId () /** * @param string $id */ - public function setId ($id) + public function setId($id) { $this->id = $id; } @@ -69,7 +69,7 @@ public function setId ($id) /** * @return string */ - public function getDescription () + public function getDescription() { return $this->description; } @@ -77,7 +77,7 @@ public function getDescription () /** * @param string $description */ - public function setDescription ($description) + public function setDescription($description) { $this->description = $description; } @@ -85,7 +85,7 @@ public function setDescription ($description) /** * @return string */ - public function getAuthMethod () + public function getAuthMethod() { return $this->authMethod; } @@ -93,7 +93,7 @@ public function getAuthMethod () /** * @param string $authMethod */ - public function setAuthMethod ($authMethod) + public function setAuthMethod($authMethod) { $this->authMethod = $authMethod; } @@ -101,7 +101,7 @@ public function setAuthMethod ($authMethod) /** * @return string */ - public function getSelector () + public function getSelector() { return $this->selector; } @@ -109,7 +109,7 @@ public function getSelector () /** * @param string $selector */ - public function setSelector ($selector) + public function setSelector($selector) { $this->selector = $selector; } @@ -117,7 +117,7 @@ public function setSelector ($selector) /** * @return string */ - public function getBindType () + public function getBindType() { return $this->bindType; } @@ -125,7 +125,7 @@ public function getBindType () /** * @param string $bindType */ - public function setBindType ($bindType) + public function setBindType($bindType) { $this->bindType = $bindType; } @@ -133,7 +133,7 @@ public function setBindType ($bindType) /** * @return string */ - public function getBindName () + public function getBindName() { return $this->bindName; } @@ -141,12 +141,12 @@ public function getBindName () /** * @param string $bindName */ - public function setBindName ($bindName) + public function setBindName($bindName) { $this->bindName = $bindName; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'ID' => 'id', @@ -157,4 +157,4 @@ protected function setKeyMapping (): array 'BindName' => 'bindName', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/BindingRules.php b/src/Request/Acl/BindingRules.php index a5fcb94..c4450d3 100644 --- a/src/Request/Acl/BindingRules.php +++ b/src/Request/Acl/BindingRules.php @@ -16,21 +16,28 @@ class BindingRules extends BaseCommand /** * @var string */ - protected $authmethod; + protected $authMethod; /** * @return null|string */ - public function getauthmethod(): ?string + public function getAuthMethod(): ?string { - return $this->authmethod; + return $this->authMethod; } /** - * @param string $authmethod + * @param string $authMethod */ - public function setauthmethod(string $authmethod): void + public function setAuthMethod($authMethod): void { - $this->authmethod = $authmethod; + $this->authMethod = $authMethod; } -} \ No newline at end of file + + protected function setKeyMapping(): array + { + return [ + 'AuthMethod' => 'authMethod', + ]; + } +} diff --git a/src/Request/Acl/Bootstrap.php b/src/Request/Acl/Bootstrap.php index 627f4ed..2120011 100644 --- a/src/Request/Acl/Bootstrap.php +++ b/src/Request/Acl/Bootstrap.php @@ -12,4 +12,4 @@ class Bootstrap extends BaseCommand { protected $url = 'acl/bootstrap'; -} \ No newline at end of file +} diff --git a/src/Request/Acl/CloneACLToken.php b/src/Request/Acl/CloneACLToken.php index 334576f..fdbe2b5 100644 --- a/src/Request/Acl/CloneACLToken.php +++ b/src/Request/Acl/CloneACLToken.php @@ -33,4 +33,4 @@ public function setUuid(string $uuid): void { $this->uuid = $uuid; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Create.php b/src/Request/Acl/Create.php index b4c2e59..d0f0048 100644 --- a/src/Request/Acl/Create.php +++ b/src/Request/Acl/Create.php @@ -43,7 +43,7 @@ class Create extends BaseCommand /** * @return string */ - public function getId () + public function getId() { return $this->id; } @@ -51,7 +51,7 @@ public function getId () /** * @param string $id */ - public function setId ($id) + public function setId($id) { $this->id = $id; } @@ -59,7 +59,7 @@ public function setId ($id) /** * @return string */ - public function getName () + public function getName() { return $this->name; } @@ -67,7 +67,7 @@ public function getName () /** * @param string $name */ - public function setName ($name) + public function setName($name) { $this->name = $name; } @@ -75,7 +75,7 @@ public function setName ($name) /** * @return string */ - public function getType () + public function getType() { return $this->type; } @@ -83,7 +83,7 @@ public function getType () /** * @param string $type */ - public function setType ($type) + public function setType($type) { $this->type = $type; } @@ -91,7 +91,7 @@ public function setType ($type) /** * @return string */ - public function getRules () + public function getRules() { return $this->rules; } @@ -99,12 +99,12 @@ public function getRules () /** * @param string $rules */ - public function setRules ($rules) + public function setRules($rules) { $this->rules = $rules; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'ID' => 'id', @@ -113,4 +113,4 @@ protected function setKeyMapping (): array 'Rules' => 'rules', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Destroy.php b/src/Request/Acl/Destroy.php index 103be5a..7371546 100644 --- a/src/Request/Acl/Destroy.php +++ b/src/Request/Acl/Destroy.php @@ -34,4 +34,4 @@ public function setUuid(string $uuid): void { $this->uuid = $uuid; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Info.php b/src/Request/Acl/Info.php index cf080ca..6adaf44 100644 --- a/src/Request/Acl/Info.php +++ b/src/Request/Acl/Info.php @@ -33,4 +33,4 @@ public function setUuid(string $uuid): void { $this->uuid = $uuid; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Lists.php b/src/Request/Acl/Lists.php index fb12f16..8312f28 100644 --- a/src/Request/Acl/Lists.php +++ b/src/Request/Acl/Lists.php @@ -12,4 +12,4 @@ class Lists extends BaseCommand { protected $url = 'acl/list'; -} \ No newline at end of file +} diff --git a/src/Request/Acl/Login.php b/src/Request/Acl/Login.php index 60f2e19..616e2ae 100644 --- a/src/Request/Acl/Login.php +++ b/src/Request/Acl/Login.php @@ -29,7 +29,7 @@ class Login extends BaseCommand /** * @return string */ - public function getAuthMethod () + public function getAuthMethod() { return $this->authMethod; } @@ -37,7 +37,7 @@ public function getAuthMethod () /** * @param string $authMethod */ - public function setAuthMethod ($authMethod) + public function setAuthMethod($authMethod) { $this->authMethod = $authMethod; } @@ -45,7 +45,7 @@ public function setAuthMethod ($authMethod) /** * @return string */ - public function getBearerToken () + public function getBearerToken() { return $this->bearerToken; } @@ -53,7 +53,7 @@ public function getBearerToken () /** * @param string $bearerToken */ - public function setBearerToken ($bearerToken) + public function setBearerToken($bearerToken) { $this->bearerToken = $bearerToken; } @@ -61,7 +61,7 @@ public function setBearerToken ($bearerToken) /** * @return array */ - public function getMeta () + public function getMeta() { return $this->meta; } @@ -69,12 +69,12 @@ public function getMeta () /** * @param array $meta */ - public function setMeta ($meta) + public function setMeta($meta) { $this->meta = $meta; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'AuthMethod' => 'authMethod', @@ -82,4 +82,4 @@ protected function setKeyMapping (): array 'Meta' => 'meta', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Logout.php b/src/Request/Acl/Logout.php index c6c3bae..42a9c5f 100644 --- a/src/Request/Acl/Logout.php +++ b/src/Request/Acl/Logout.php @@ -18,7 +18,7 @@ class Logout extends BaseCommand /** * @return mixed */ - public function getToken () + public function getToken() { return $this->token; } @@ -26,8 +26,8 @@ public function getToken () /** * @param mixed $token */ - public function setToken ($token) + public function setToken($token) { $this->token = $token; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Policies.php b/src/Request/Acl/Policies.php index bae3e00..f23eb38 100644 --- a/src/Request/Acl/Policies.php +++ b/src/Request/Acl/Policies.php @@ -12,4 +12,4 @@ class Policies extends BaseCommand { protected $url = 'acl/policies'; -} \ No newline at end of file +} diff --git a/src/Request/Acl/Policy.php b/src/Request/Acl/Policy.php index 931464e..7ae2928 100644 --- a/src/Request/Acl/Policy.php +++ b/src/Request/Acl/Policy.php @@ -48,7 +48,7 @@ class Policy extends BaseCommand /** * @return string */ - public function getId () + public function getId() { return $this->id; } @@ -56,7 +56,7 @@ public function getId () /** * @param string $id */ - public function setId ($id) + public function setId($id) { $this->id = $id; } @@ -64,7 +64,7 @@ public function setId ($id) /** * @return string */ - public function getName () + public function getName() { return $this->name; } @@ -72,7 +72,7 @@ public function getName () /** * @param string $name */ - public function setName ($name) + public function setName($name) { $this->name = $name; } @@ -80,7 +80,7 @@ public function setName ($name) /** * @return string */ - public function getDescription () + public function getDescription() { return $this->description; } @@ -88,7 +88,7 @@ public function getDescription () /** * @param string $description */ - public function setDescription ($description) + public function setDescription($description) { $this->description = $description; } @@ -96,7 +96,7 @@ public function setDescription ($description) /** * @return string */ - public function getRules () + public function getRules() { return $this->rules; } @@ -104,7 +104,7 @@ public function getRules () /** * @param string $rules */ - public function setRules ($rules) + public function setRules($rules) { $this->rules = $rules; } @@ -112,7 +112,7 @@ public function setRules ($rules) /** * @return string */ - public function getDatacenters () + public function getDataCenters() { return $this->datacenters; } @@ -120,12 +120,12 @@ public function getDatacenters () /** * @param string $datacenters */ - public function setDatacenters ($datacenters) + public function setDataCenters($datacenters) { $this->datacenters = $datacenters; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'ID' => 'id', @@ -135,5 +135,4 @@ protected function setKeyMapping (): array 'Datacenters' => 'datacenters', ]; } - -} \ No newline at end of file +} diff --git a/src/Request/Acl/Replication.php b/src/Request/Acl/Replication.php index 8b45f94..b546c23 100644 --- a/src/Request/Acl/Replication.php +++ b/src/Request/Acl/Replication.php @@ -33,4 +33,4 @@ public function setDc(string $dc): void { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Role.php b/src/Request/Acl/Role.php index 39a6566..98ea6ec 100644 --- a/src/Request/Acl/Role.php +++ b/src/Request/Acl/Role.php @@ -67,7 +67,7 @@ class Role extends BaseCommand /** * @return string */ - public function getId () + public function getId() { return $this->id; } @@ -75,7 +75,7 @@ public function getId () /** * @param string $id */ - public function setId ($id) + public function setId($id) { $this->id = $id; } @@ -83,7 +83,7 @@ public function setId ($id) /** * @return string */ - public function getName () + public function getName() { return $this->name; } @@ -91,7 +91,7 @@ public function getName () /** * @param string $name */ - public function setName ($name) + public function setName($name) { $this->name = $name; } @@ -99,7 +99,7 @@ public function setName ($name) /** * @return string */ - public function getDescription () + public function getDescription() { return $this->description; } @@ -107,7 +107,7 @@ public function getDescription () /** * @param string $description */ - public function setDescription ($description) + public function setDescription($description) { $this->description = $description; } @@ -115,7 +115,7 @@ public function setDescription ($description) /** * @return array */ - public function getPolicies () + public function getPolicies() { return $this->policies; } @@ -123,7 +123,7 @@ public function getPolicies () /** * @param array $policies */ - public function setPolicies ($policies) + public function setPolicies($policies) { $this->policies = $policies; } @@ -131,7 +131,7 @@ public function setPolicies ($policies) /** * @return array */ - public function getServiceIdentities () + public function getServiceIdentities() { return $this->serviceIdentities; } @@ -139,12 +139,12 @@ public function getServiceIdentities () /** * @param array $serviceIdentities */ - public function setServiceIdentities ($serviceIdentities) + public function setServiceIdentities($serviceIdentities) { $this->serviceIdentities = $serviceIdentities; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'ID' => 'id', @@ -154,4 +154,4 @@ protected function setKeyMapping (): array 'ServiceIdentities' => 'serviceIdentities', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Role/Name.php b/src/Request/Acl/Role/Name.php index 4d71699..27587fe 100644 --- a/src/Request/Acl/Role/Name.php +++ b/src/Request/Acl/Role/Name.php @@ -31,4 +31,4 @@ public function setname(string $name): void { $this->name = $name; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Roles.php b/src/Request/Acl/Roles.php index a36761e..5c9a647 100644 --- a/src/Request/Acl/Roles.php +++ b/src/Request/Acl/Roles.php @@ -33,4 +33,4 @@ public function setpolicy(string $policy): void { $this->policy = $policy; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Token.php b/src/Request/Acl/Token.php index 533e055..924d79c 100644 --- a/src/Request/Acl/Token.php +++ b/src/Request/Acl/Token.php @@ -70,7 +70,7 @@ class Token extends BaseCommand /** * @return string */ - public function getAccessorID () + public function getAccessorID() { return $this->accessorID; } @@ -78,7 +78,7 @@ public function getAccessorID () /** * @param string $accessorID */ - public function setAccessorID ($accessorID) + public function setAccessorID($accessorID) { $this->accessorID = $accessorID; } @@ -86,7 +86,7 @@ public function setAccessorID ($accessorID) /** * @return string */ - public function getSecretID () + public function getSecretID() { return $this->secretID; } @@ -94,7 +94,7 @@ public function getSecretID () /** * @param string $secretID */ - public function setSecretID ($secretID) + public function setSecretID($secretID) { $this->secretID = $secretID; } @@ -102,7 +102,7 @@ public function setSecretID ($secretID) /** * @return string */ - public function getDescription () + public function getDescription() { return $this->description; } @@ -110,7 +110,7 @@ public function getDescription () /** * @param string $description */ - public function setDescription ($description) + public function setDescription($description) { $this->description = $description; } @@ -118,7 +118,7 @@ public function setDescription ($description) /** * @return array */ - public function getPolicies () + public function getPolicies() { return $this->policies; } @@ -126,7 +126,7 @@ public function getPolicies () /** * @param array $policies */ - public function setPolicies ($policies) + public function setPolicies($policies) { $this->policies = $policies; } @@ -134,7 +134,7 @@ public function setPolicies ($policies) /** * @return array */ - public function getRoles () + public function getRoles() { return $this->roles; } @@ -142,7 +142,7 @@ public function getRoles () /** * @param array $roles */ - public function setRoles ($roles) + public function setRoles($roles) { $this->roles = $roles; } @@ -150,7 +150,7 @@ public function setRoles ($roles) /** * @return array */ - public function getServiceIdentities () + public function getServiceIdentities() { return $this->serviceIdentities; } @@ -158,7 +158,7 @@ public function getServiceIdentities () /** * @param array $serviceIdentities */ - public function setServiceIdentities ($serviceIdentities) + public function setServiceIdentities($serviceIdentities) { $this->serviceIdentities = $serviceIdentities; } @@ -166,7 +166,7 @@ public function setServiceIdentities ($serviceIdentities) /** * @return bool */ - public function isLocal () + public function isLocal() { return $this->local; } @@ -174,7 +174,7 @@ public function isLocal () /** * @param bool $local */ - public function setLocal ($local) + public function setLocal($local) { $this->local = $local; } @@ -182,7 +182,7 @@ public function setLocal ($local) /** * @return string */ - public function getExpirationTime () + public function getExpirationTime() { return $this->expirationTime; } @@ -190,7 +190,7 @@ public function getExpirationTime () /** * @param string $expirationTime */ - public function setExpirationTime ($expirationTime) + public function setExpirationTime($expirationTime) { $this->expirationTime = $expirationTime; } @@ -198,7 +198,7 @@ public function setExpirationTime ($expirationTime) /** * @return string */ - public function getExpirationTTL () + public function getExpirationTTL() { return $this->expirationTTL; } @@ -206,12 +206,12 @@ public function getExpirationTTL () /** * @param string $expirationTTL */ - public function setExpirationTTL ($expirationTTL) + public function setExpirationTTL($expirationTTL) { $this->expirationTTL = $expirationTTL; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'AccessorID' => 'accessorID', @@ -225,4 +225,4 @@ protected function setKeyMapping (): array 'ExpirationTTL' => 'expirationTTL', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Token/CloneToken.php b/src/Request/Acl/Token/CloneToken.php index 9080ce7..ef8398f 100644 --- a/src/Request/Acl/Token/CloneToken.php +++ b/src/Request/Acl/Token/CloneToken.php @@ -25,7 +25,7 @@ class CloneToken extends BaseCommand /** * @return string */ - public function getAccessorID () + public function getAccessorID() { return $this->accessorID; } @@ -33,7 +33,7 @@ public function getAccessorID () /** * @param string $accessorID */ - public function setAccessorID ($accessorID) + public function setAccessorID($accessorID) { $this->accessorID = $accessorID; } @@ -41,7 +41,7 @@ public function setAccessorID ($accessorID) /** * @return string */ - public function getDescription () + public function getDescription() { return $this->description; } @@ -49,17 +49,16 @@ public function getDescription () /** * @param string $description */ - public function setDescription ($description) + public function setDescription($description) { $this->description = $description; } - protected function setKeyMapping (): array - { - return [ + protected function setKeyMapping(): array + { + return [ 'AccessorID' => 'accessorID', 'Description' => 'description', - ]; - } - -} \ No newline at end of file + ]; + } +} diff --git a/src/Request/Acl/Token/GetSelf.php b/src/Request/Acl/Token/GetSelf.php index af942f5..7469623 100644 --- a/src/Request/Acl/Token/GetSelf.php +++ b/src/Request/Acl/Token/GetSelf.php @@ -18,7 +18,7 @@ class GetSelf extends BaseCommand /** * @return mixed */ - public function getToken () + public function getToken() { return $this->token; } @@ -26,8 +26,8 @@ public function getToken () /** * @param mixed $token */ - public function setToken ($token) + public function setToken($token) { $this->token = $token; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Tokens.php b/src/Request/Acl/Tokens.php index 515ad34..f96d5ef 100644 --- a/src/Request/Acl/Tokens.php +++ b/src/Request/Acl/Tokens.php @@ -61,7 +61,7 @@ public function setRole(string $role): void /** * @return null|string */ - public function getAuthmethod(): ?string + public function getAuthMethod(): ?string { return $this->authmethod; } @@ -69,8 +69,8 @@ public function getAuthmethod(): ?string /** * @param string $authmethod */ - public function setAuthmethod(string $authmethod): void + public function setAuthMethod(string $authmethod): void { $this->authmethod = $authmethod; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Translate.php b/src/Request/Acl/Translate.php index 26c9835..f0159e2 100644 --- a/src/Request/Acl/Translate.php +++ b/src/Request/Acl/Translate.php @@ -18,7 +18,7 @@ class Translate extends BaseCommand /** * @return mixed */ - public function getAccessorId () + public function getAccessorId() { return $this->accessor_id; } @@ -26,8 +26,8 @@ public function getAccessorId () /** * @param mixed $accessor_id */ - public function setAccessorId ($accessor_id) + public function setAccessorId($accessor_id) { $this->accessor_id = $accessor_id; } -} \ No newline at end of file +} diff --git a/src/Request/Acl/Update.php b/src/Request/Acl/Update.php index 4d2a385..694565c 100644 --- a/src/Request/Acl/Update.php +++ b/src/Request/Acl/Update.php @@ -33,7 +33,7 @@ class Update extends BaseCommand /** * @return string */ - public function getId () + public function getId() { return $this->id; } @@ -41,7 +41,7 @@ public function getId () /** * @param string $id */ - public function setId ($id) + public function setId($id) { $this->id = $id; } @@ -49,7 +49,7 @@ public function setId ($id) /** * @return string */ - public function getName () + public function getName() { return $this->name; } @@ -57,7 +57,7 @@ public function getName () /** * @param string $name */ - public function setName ($name) + public function setName($name) { $this->name = $name; } @@ -65,7 +65,7 @@ public function setName ($name) /** * @return string */ - public function getType () + public function getType() { return $this->type; } @@ -73,7 +73,7 @@ public function getType () /** * @param string $type */ - public function setType ($type) + public function setType($type) { $this->type = $type; } @@ -81,7 +81,7 @@ public function setType ($type) /** * @return string */ - public function getRules () + public function getRules() { return $this->rules; } @@ -89,12 +89,12 @@ public function getRules () /** * @param string $rules */ - public function setRules ($rules) + public function setRules($rules) { $this->rules = $rules; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'ID' => 'id', @@ -103,4 +103,4 @@ protected function setKeyMapping (): array 'Rules' => 'rules', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Check/Deregister.php b/src/Request/Agent/Check/Deregister.php index fcf3de9..81ba674 100644 --- a/src/Request/Agent/Check/Deregister.php +++ b/src/Request/Agent/Check/Deregister.php @@ -33,4 +33,4 @@ public function setCheckId(string $checkId): void { $this->check_id = $checkId; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Check/Fail.php b/src/Request/Agent/Check/Fail.php index 51b0dbc..a737623 100644 --- a/src/Request/Agent/Check/Fail.php +++ b/src/Request/Agent/Check/Fail.php @@ -53,4 +53,4 @@ public function setNote(string $note): void { $this->note = $note; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Check/Pass.php b/src/Request/Agent/Check/Pass.php index b1be8a6..84b5e06 100644 --- a/src/Request/Agent/Check/Pass.php +++ b/src/Request/Agent/Check/Pass.php @@ -53,4 +53,4 @@ public function setNote(string $note): void { $this->note = $note; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Check/Register.php b/src/Request/Agent/Check/Register.php index 7f1f204..1f47c46 100644 --- a/src/Request/Agent/Check/Register.php +++ b/src/Request/Agent/Check/Register.php @@ -115,7 +115,7 @@ class Register extends BaseCommand /** * @return string */ - public function getName () + public function getName() { return $this->name; } @@ -123,7 +123,7 @@ public function getName () /** * @param string $name */ - public function setName ($name) + public function setName($name) { $this->name = $name; } @@ -131,7 +131,7 @@ public function setName ($name) /** * @return string */ - public function getID () + public function getID() { return $this->ID; } @@ -139,7 +139,7 @@ public function getID () /** * @param string $ID */ - public function setID ($ID) + public function setID($ID) { $this->ID = $ID; } @@ -147,7 +147,7 @@ public function setID ($ID) /** * @return string */ - public function getInterval () + public function getInterval() { return $this->interval; } @@ -155,7 +155,7 @@ public function getInterval () /** * @param string $interval */ - public function setInterval ($interval) + public function setInterval($interval) { $this->interval = $interval; } @@ -163,7 +163,7 @@ public function setInterval ($interval) /** * @return string */ - public function getNotes () + public function getNotes() { return $this->notes; } @@ -171,7 +171,7 @@ public function getNotes () /** * @param string $notes */ - public function setNotes ($notes) + public function setNotes($notes) { $this->notes = $notes; } @@ -179,7 +179,7 @@ public function setNotes ($notes) /** * @return string */ - public function getDeregisterCriticalServiceAfter () + public function getDeregisterCriticalServiceAfter() { return $this->deregisterCriticalServiceAfter; } @@ -187,7 +187,7 @@ public function getDeregisterCriticalServiceAfter () /** * @param string $deregisterCriticalServiceAfter */ - public function setDeregisterCriticalServiceAfter ($deregisterCriticalServiceAfter) + public function setDeregisterCriticalServiceAfter($deregisterCriticalServiceAfter) { $this->deregisterCriticalServiceAfter = $deregisterCriticalServiceAfter; } @@ -195,7 +195,7 @@ public function setDeregisterCriticalServiceAfter ($deregisterCriticalServiceAft /** * @return array */ - public function getArgs () + public function getArgs() { return $this->args; } @@ -203,7 +203,7 @@ public function getArgs () /** * @param array $args */ - public function setArgs ($args) + public function setArgs($args) { $this->args = $args; } @@ -211,7 +211,7 @@ public function setArgs ($args) /** * @return string */ - public function getAliasNode () + public function getAliasNode() { return $this->aliasNode; } @@ -219,7 +219,7 @@ public function getAliasNode () /** * @param string $aliasNode */ - public function setAliasNode ($aliasNode) + public function setAliasNode($aliasNode) { $this->aliasNode = $aliasNode; } @@ -227,7 +227,7 @@ public function setAliasNode ($aliasNode) /** * @return string */ - public function getAliasService () + public function getAliasService() { return $this->aliasService; } @@ -235,7 +235,7 @@ public function getAliasService () /** * @param string $aliasService */ - public function setAliasService ($aliasService) + public function setAliasService($aliasService) { $this->aliasService = $aliasService; } @@ -243,7 +243,7 @@ public function setAliasService ($aliasService) /** * @return string */ - public function getDockerContainerID () + public function getDockerContainerID() { return $this->dockerContainerID; } @@ -251,7 +251,7 @@ public function getDockerContainerID () /** * @param string $dockerContainerID */ - public function setDockerContainerID ($dockerContainerID) + public function setDockerContainerID($dockerContainerID) { $this->dockerContainerID = $dockerContainerID; } @@ -259,7 +259,7 @@ public function setDockerContainerID ($dockerContainerID) /** * @return string */ - public function getGRPC () + public function getGRPC() { return $this->GRPC; } @@ -267,7 +267,7 @@ public function getGRPC () /** * @param string $GRPC */ - public function setGRPC ($GRPC) + public function setGRPC($GRPC) { $this->GRPC = $GRPC; } @@ -275,7 +275,7 @@ public function setGRPC ($GRPC) /** * @return bool */ - public function isGRPCUseTLS () + public function isGRPCUseTLS() { return $this->GRPCUseTLS; } @@ -283,7 +283,7 @@ public function isGRPCUseTLS () /** * @param bool $GRPCUseTLS */ - public function setGRPCUseTLS ($GRPCUseTLS) + public function setGRPCUseTLS($GRPCUseTLS) { $this->GRPCUseTLS = $GRPCUseTLS; } @@ -291,7 +291,7 @@ public function setGRPCUseTLS ($GRPCUseTLS) /** * @return string */ - public function getHTTP () + public function getHTTP() { return $this->HTTP; } @@ -299,7 +299,7 @@ public function getHTTP () /** * @param string $HTTP */ - public function setHTTP ($HTTP) + public function setHTTP($HTTP) { $this->HTTP = $HTTP; } @@ -307,7 +307,7 @@ public function setHTTP ($HTTP) /** * @return string */ - public function getMethod () + public function getMethod() { return $this->method; } @@ -315,7 +315,7 @@ public function getMethod () /** * @param string $method */ - public function setMethod ($method) + public function setMethod($method) { $this->method = $method; } @@ -323,7 +323,7 @@ public function setMethod ($method) /** * @return map */ - public function getHeader () + public function getHeader() { return $this->header; } @@ -331,7 +331,7 @@ public function getHeader () /** * @param map $header */ - public function setHeader ($header) + public function setHeader($header) { $this->header = json_encode($header); } @@ -339,7 +339,7 @@ public function setHeader ($header) /** * @return string */ - public function getTimeout () + public function getTimeout() { return $this->timeout; } @@ -347,7 +347,7 @@ public function getTimeout () /** * @param string $timeout */ - public function setTimeout ($timeout) + public function setTimeout($timeout) { $this->timeout = $timeout; } @@ -355,7 +355,7 @@ public function setTimeout ($timeout) /** * @return int */ - public function getOutputMaxSize () + public function getOutputMaxSize() { return $this->outputMaxSize; } @@ -363,7 +363,7 @@ public function getOutputMaxSize () /** * @param int $outputMaxSize */ - public function setOutputMaxSize ($outputMaxSize) + public function setOutputMaxSize($outputMaxSize) { $this->outputMaxSize = $outputMaxSize; } @@ -371,7 +371,7 @@ public function setOutputMaxSize ($outputMaxSize) /** * @return bool */ - public function isTLSSkipVerify () + public function isTLSSkipVerify() { return $this->TLSSkipVerify; } @@ -379,7 +379,7 @@ public function isTLSSkipVerify () /** * @param bool $TLSSkipVerify */ - public function setTLSSkipVerify ($TLSSkipVerify) + public function setTLSSkipVerify($TLSSkipVerify) { $this->TLSSkipVerify = $TLSSkipVerify; } @@ -387,7 +387,7 @@ public function setTLSSkipVerify ($TLSSkipVerify) /** * @return string */ - public function getTCP () + public function getTCP() { return $this->TCP; } @@ -395,7 +395,7 @@ public function getTCP () /** * @param string $TCP */ - public function setTCP ($TCP) + public function setTCP($TCP) { $this->TCP = $TCP; } @@ -403,7 +403,7 @@ public function setTCP ($TCP) /** * @return string */ - public function getTTL () + public function getTTL() { return $this->TTL; } @@ -411,7 +411,7 @@ public function getTTL () /** * @param string $TTL */ - public function setTTL ($TTL) + public function setTTL($TTL) { $this->TTL = $TTL; } @@ -419,7 +419,7 @@ public function setTTL ($TTL) /** * @return string */ - public function getServiceID () + public function getServiceID() { return $this->serviceID; } @@ -427,7 +427,7 @@ public function getServiceID () /** * @param string $serviceID */ - public function setServiceID ($serviceID) + public function setServiceID($serviceID) { $this->serviceID = $serviceID; } @@ -435,7 +435,7 @@ public function setServiceID ($serviceID) /** * @return string */ - public function getStatus () + public function getStatus() { return $this->status; } @@ -443,12 +443,12 @@ public function getStatus () /** * @param string $status */ - public function setStatus ($status) + public function setStatus($status) { $this->status = $status; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'Name' => 'name', @@ -468,4 +468,4 @@ protected function setKeyMapping (): array 'Status' => 'status', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Check/Update.php b/src/Request/Agent/Check/Update.php index 919a1f7..c6e353d 100644 --- a/src/Request/Agent/Check/Update.php +++ b/src/Request/Agent/Check/Update.php @@ -46,7 +46,7 @@ public function setCheckId(string $checkId): void /** * @return string */ - public function getStatus () + public function getStatus() { return $this->status; } @@ -54,7 +54,7 @@ public function getStatus () /** * @param string $status */ - public function setStatus ($status) + public function setStatus($status) { $this->status = $status; } @@ -62,7 +62,7 @@ public function setStatus ($status) /** * @return string */ - public function getOutput () + public function getOutput() { return $this->output; } @@ -70,17 +70,16 @@ public function getOutput () /** * @param string $output */ - public function setOutput ($output) + public function setOutput($output) { $this->output = $output; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'Status' => 'status', 'Output' => 'output', ]; } - -} \ No newline at end of file +} diff --git a/src/Request/Agent/Check/Warn.php b/src/Request/Agent/Check/Warn.php index f41823e..028ee0d 100644 --- a/src/Request/Agent/Check/Warn.php +++ b/src/Request/Agent/Check/Warn.php @@ -53,4 +53,4 @@ public function setNote(string $note): void { $this->note = $note; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Checks.php b/src/Request/Agent/Checks.php index b5d05f1..7ac54aa 100644 --- a/src/Request/Agent/Checks.php +++ b/src/Request/Agent/Checks.php @@ -27,4 +27,4 @@ public function setFilter(string $filter): void { $this->filter = $filter; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Connect/Authorize.php b/src/Request/Agent/Connect/Authorize.php index 1b092c0..26234cf 100644 --- a/src/Request/Agent/Connect/Authorize.php +++ b/src/Request/Agent/Connect/Authorize.php @@ -33,7 +33,7 @@ class Authorize extends BaseCommand /** * @return string */ - public function getTarget () + public function getTarget() { return $this->target; } @@ -41,7 +41,7 @@ public function getTarget () /** * @param string $target */ - public function setTarget ($target) + public function setTarget($target) { $this->target = $target; } @@ -49,7 +49,7 @@ public function setTarget ($target) /** * @return string */ - public function getClientCertURI () + public function getClientCertURI() { return $this->clientCertURI; } @@ -57,7 +57,7 @@ public function getClientCertURI () /** * @param string $clientCertURI */ - public function setClientCertURI ($clientCertURI) + public function setClientCertURI($clientCertURI) { $this->clientCertURI = $clientCertURI; } @@ -65,7 +65,7 @@ public function setClientCertURI ($clientCertURI) /** * @return string */ - public function getClientCertSerial () + public function getClientCertSerial() { return $this->clientCertSerial; } @@ -73,12 +73,12 @@ public function getClientCertSerial () /** * @param string $clientCertSerial */ - public function setClientCertSerial ($clientCertSerial) + public function setClientCertSerial($clientCertSerial) { $this->clientCertSerial = $clientCertSerial; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'Target' => 'target', @@ -86,4 +86,4 @@ protected function setKeyMapping (): array 'ClientCertSerial' => 'clientCertSerial', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Connect/ca/Leaf.php b/src/Request/Agent/Connect/ca/Leaf.php index 9f6d44d..f329a0c 100644 --- a/src/Request/Agent/Connect/ca/Leaf.php +++ b/src/Request/Agent/Connect/ca/Leaf.php @@ -15,7 +15,7 @@ class Leaf extends BaseCommand /** * @return string */ - public function getService () + public function getService() { return $this->service; } @@ -23,15 +23,15 @@ public function getService () /** * @param string $service */ - public function setService ($service) + public function setService($service) { $this->service = $service; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'Service' => 'service', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Connect/ca/Roots.php b/src/Request/Agent/Connect/ca/Roots.php index 1ec382d..9c8a81a 100644 --- a/src/Request/Agent/Connect/ca/Roots.php +++ b/src/Request/Agent/Connect/ca/Roots.php @@ -6,4 +6,4 @@ class Roots extends BaseCommand { protected $url = 'agent/connect/ca/roots'; -} \ No newline at end of file +} diff --git a/src/Request/Agent/ForceLeave.php b/src/Request/Agent/ForceLeave.php index 892be8f..47294b1 100644 --- a/src/Request/Agent/ForceLeave.php +++ b/src/Request/Agent/ForceLeave.php @@ -27,4 +27,4 @@ public function setNode(string $node): void { $this->node = $node; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Health/Service/ID.php b/src/Request/Agent/Health/Service/ID.php index 3140d94..ee60bc2 100644 --- a/src/Request/Agent/Health/Service/ID.php +++ b/src/Request/Agent/Health/Service/ID.php @@ -46,4 +46,4 @@ public function setFormat(string $format): void { $this->format = $format; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Health/Service/Name.php b/src/Request/Agent/Health/Service/Name.php index d87ae16..6ca30e0 100644 --- a/src/Request/Agent/Health/Service/Name.php +++ b/src/Request/Agent/Health/Service/Name.php @@ -46,4 +46,4 @@ public function setFormat(string $format): void { $this->format = $format; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Join.php b/src/Request/Agent/Join.php index a50d938..2129a22 100644 --- a/src/Request/Agent/Join.php +++ b/src/Request/Agent/Join.php @@ -47,4 +47,4 @@ public function setWan(string $wan): void { $this->wan = $wan; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Leave.php b/src/Request/Agent/Leave.php index 39ede34..2a4e803 100644 --- a/src/Request/Agent/Leave.php +++ b/src/Request/Agent/Leave.php @@ -6,4 +6,4 @@ class Leave extends BaseCommand { protected $url = 'agent/leave'; -} \ No newline at end of file +} diff --git a/src/Request/Agent/Maintenance.php b/src/Request/Agent/Maintenance.php index 0943414..102998a 100644 --- a/src/Request/Agent/Maintenance.php +++ b/src/Request/Agent/Maintenance.php @@ -50,4 +50,4 @@ public function setReason(string $reason): void { $this->reason = $reason; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Members.php b/src/Request/Agent/Members.php index aa18379..6731682 100644 --- a/src/Request/Agent/Members.php +++ b/src/Request/Agent/Members.php @@ -48,4 +48,4 @@ public function setSegment(string $segment): void { $this->segment = $segment; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Metrics.php b/src/Request/Agent/Metrics.php index 8107288..03d2c3e 100644 --- a/src/Request/Agent/Metrics.php +++ b/src/Request/Agent/Metrics.php @@ -28,4 +28,4 @@ public function setFormat(string $format): void { $this->format = $format; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Monitor.php b/src/Request/Agent/Monitor.php index d84f431..6429df8 100644 --- a/src/Request/Agent/Monitor.php +++ b/src/Request/Agent/Monitor.php @@ -28,4 +28,4 @@ public function setLoglevel(string $loglevel): void { $this->loglevel = $loglevel; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Reload.php b/src/Request/Agent/Reload.php index 94cad90..48f1711 100644 --- a/src/Request/Agent/Reload.php +++ b/src/Request/Agent/Reload.php @@ -6,4 +6,4 @@ class Reload extends BaseCommand { protected $url = 'agent/reload'; -} \ No newline at end of file +} diff --git a/src/Request/Agent/SelfParams.php b/src/Request/Agent/SelfParams.php index 0b000d4..9053821 100644 --- a/src/Request/Agent/SelfParams.php +++ b/src/Request/Agent/SelfParams.php @@ -6,4 +6,4 @@ class SelfParams extends BaseCommand { protected $url = 'agent/self'; -} \ No newline at end of file +} diff --git a/src/Request/Agent/Service.php b/src/Request/Agent/Service.php index bfbb1d4..cb3e28c 100644 --- a/src/Request/Agent/Service.php +++ b/src/Request/Agent/Service.php @@ -33,4 +33,4 @@ public function setServiceId(string $service_id): void { $this->service_id = $service_id; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Service/Deregister.php b/src/Request/Agent/Service/Deregister.php index 380b77d..2302e87 100644 --- a/src/Request/Agent/Service/Deregister.php +++ b/src/Request/Agent/Service/Deregister.php @@ -27,4 +27,4 @@ public function setServiceId(string $serviceId): void { $this->service_id = $serviceId; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Service/Maintenance.php b/src/Request/Agent/Service/Maintenance.php index 1b742ab..cbf3a7a 100644 --- a/src/Request/Agent/Service/Maintenance.php +++ b/src/Request/Agent/Service/Maintenance.php @@ -67,4 +67,4 @@ public function setReason(string $reason): void { $this->reason = $reason; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Service/Register.php b/src/Request/Agent/Service/Register.php index 612d9bf..ea02b9d 100644 --- a/src/Request/Agent/Service/Register.php +++ b/src/Request/Agent/Service/Register.php @@ -100,7 +100,7 @@ class Register extends BaseCommand /** * @return string */ - public function getName () + public function getName() { return $this->name; } @@ -108,7 +108,7 @@ public function getName () /** * @param string $name */ - public function setName ($name) + public function setName($name) { $this->name = $name; } @@ -116,7 +116,7 @@ public function setName ($name) /** * @return string */ - public function getId () + public function getId() { return $this->id; } @@ -124,7 +124,7 @@ public function getId () /** * @param string $id */ - public function setId ($id) + public function setId($id) { $this->id = $id; } @@ -132,7 +132,7 @@ public function setId ($id) /** * @return string */ - public function getTags () + public function getTags() { return $this->tags; } @@ -140,7 +140,7 @@ public function getTags () /** * @param string $tags */ - public function setTags ($tags) + public function setTags($tags) { $this->tags = $tags; } @@ -148,7 +148,7 @@ public function setTags ($tags) /** * @return string */ - public function getAddress () + public function getAddress() { return $this->address; } @@ -156,7 +156,7 @@ public function getAddress () /** * @param string $address */ - public function setAddress ($address) + public function setAddress($address) { $this->address = $address; } @@ -164,7 +164,7 @@ public function setAddress ($address) /** * @return array */ - public function getTaggedAddresses () + public function getTaggedAddresses() { return $this->taggedAddresses; } @@ -172,7 +172,7 @@ public function getTaggedAddresses () /** * @param array $taggedAddresses */ - public function setTaggedAddresses ($taggedAddresses) + public function setTaggedAddresses($taggedAddresses) { $this->taggedAddresses = $taggedAddresses; } @@ -180,7 +180,7 @@ public function setTaggedAddresses ($taggedAddresses) /** * @return array */ - public function getMeta () + public function getMeta() { return $this->meta; } @@ -188,7 +188,7 @@ public function getMeta () /** * @param array $meta */ - public function setMeta ($meta) + public function setMeta($meta) { $this->meta = json_encode($meta); } @@ -196,7 +196,7 @@ public function setMeta ($meta) /** * @return int */ - public function getPort () + public function getPort() { return $this->port; } @@ -204,7 +204,7 @@ public function getPort () /** * @param int $port */ - public function setPort ($port) + public function setPort($port) { $this->port = $port; } @@ -212,7 +212,7 @@ public function setPort ($port) /** * @return string */ - public function getKind () + public function getKind() { return $this->kind; } @@ -220,7 +220,7 @@ public function getKind () /** * @param string $kind */ - public function setKind ($kind) + public function setKind($kind) { $this->kind = $kind; } @@ -228,7 +228,7 @@ public function setKind ($kind) /** * @return string */ - public function getProxyDestination () + public function getProxyDestination() { return $this->proxyDestination; } @@ -236,7 +236,7 @@ public function getProxyDestination () /** * @param string $proxyDestination */ - public function setProxyDestination ($proxyDestination) + public function setProxyDestination($proxyDestination) { $this->proxyDestination = $proxyDestination; } @@ -244,7 +244,7 @@ public function setProxyDestination ($proxyDestination) /** * @return string */ - public function getProxy () + public function getProxy() { return $this->proxy; } @@ -252,7 +252,7 @@ public function getProxy () /** * @param string $proxy */ - public function setProxy ($proxy) + public function setProxy($proxy) { $this->proxy = $proxy; } @@ -260,7 +260,7 @@ public function setProxy ($proxy) /** * @return string */ - public function getConnect () + public function getConnect() { return $this->connect; } @@ -268,7 +268,7 @@ public function getConnect () /** * @param string $connect */ - public function setConnect ($connect) + public function setConnect($connect) { $this->connect = $connect; } @@ -276,7 +276,7 @@ public function setConnect ($connect) /** * @return string */ - public function getCheck () + public function getCheck() { return $this->check; } @@ -284,7 +284,7 @@ public function getCheck () /** * @param string $check */ - public function setCheck ($check) + public function setCheck($check) { $this->check = json_encode($check); } @@ -292,7 +292,7 @@ public function setCheck ($check) /** * @return array */ - public function getChecks () + public function getChecks() { return $this->checks; } @@ -300,7 +300,7 @@ public function getChecks () /** * @param array $checks */ - public function setChecks ($checks) + public function setChecks($checks) { $this->checks = $checks; } @@ -308,7 +308,7 @@ public function setChecks ($checks) /** * @return bool */ - public function isEnableTagOverride () + public function isEnableTagOverride() { return $this->enableTagOverride; } @@ -316,7 +316,7 @@ public function isEnableTagOverride () /** * @param bool $enableTagOverride */ - public function setEnableTagOverride ($enableTagOverride) + public function setEnableTagOverride($enableTagOverride) { $this->enableTagOverride = $enableTagOverride; } @@ -324,7 +324,7 @@ public function setEnableTagOverride ($enableTagOverride) /** * @return string */ - public function getWeights () + public function getWeights() { return $this->weights; } @@ -332,12 +332,12 @@ public function getWeights () /** * @param string $weights */ - public function setWeights ($weights) + public function setWeights($weights) { $this->weights = json_encode($weights); } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'Name' => 'name', @@ -356,4 +356,4 @@ protected function setKeyMapping (): array 'Weights' => 'weights' ]; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Services.php b/src/Request/Agent/Services.php index a6c84cb..10175a6 100644 --- a/src/Request/Agent/Services.php +++ b/src/Request/Agent/Services.php @@ -29,7 +29,8 @@ public function getFilter(): ?string /** * @param string $filter */ - public function setFilter(string $filter): void { + public function setFilter(string $filter): void + { $this->filter = $filter; } -} \ No newline at end of file +} diff --git a/src/Request/Agent/Token.php b/src/Request/Agent/Token.php index a811a4c..f503289 100644 --- a/src/Request/Agent/Token.php +++ b/src/Request/Agent/Token.php @@ -49,8 +49,8 @@ public function setAction(string $action): void $this->action = $action; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return ['Token' => 'token']; } -} \ No newline at end of file +} diff --git a/src/Request/BaseCommand.php b/src/Request/BaseCommand.php index d1047cd..b104d9d 100644 --- a/src/Request/BaseCommand.php +++ b/src/Request/BaseCommand.php @@ -19,7 +19,7 @@ class BaseCommand extends SplBean /** * @return string */ - public function getUrl () + public function getUrl() { return $this->url; } @@ -27,9 +27,8 @@ public function getUrl () /** * @param string $url */ - public function setUrl ($url) + public function setUrl($url) { $this->url = $url; } - -} \ No newline at end of file +} diff --git a/src/Request/Catalog/Connect.php b/src/Request/Catalog/Connect.php index 6dd2a80..a85d3a6 100644 --- a/src/Request/Catalog/Connect.php +++ b/src/Request/Catalog/Connect.php @@ -132,4 +132,4 @@ public function setKeyMapping(): array { return ['node-meta' => 'node_meta']; } -} \ No newline at end of file +} diff --git a/src/Request/Catalog/Datacenters.php b/src/Request/Catalog/Datacenters.php index d8a89ba..69f6444 100644 --- a/src/Request/Catalog/Datacenters.php +++ b/src/Request/Catalog/Datacenters.php @@ -9,7 +9,7 @@ use EasySwoole\Consul\Request\BaseCommand; -class Datacenters extends BaseCommand +class DataCenters extends BaseCommand { public $url='catalog/datacenters'; -} \ No newline at end of file +} diff --git a/src/Request/Catalog/Deregister.php b/src/Request/Catalog/Deregister.php index e603bc5..dfabb7a 100644 --- a/src/Request/Catalog/Deregister.php +++ b/src/Request/Catalog/Deregister.php @@ -3,7 +3,7 @@ use EasySwoole\Consul\Request\BaseCommand; -class Deregister extends BaseCommand +class DeRegister extends BaseCommand { public $url='catalog/deregister'; @@ -27,7 +27,7 @@ class Deregister extends BaseCommand /** * @return string */ - public function getDatacenter () + public function getDatacenter() { return $this->datacenter; } @@ -35,7 +35,7 @@ public function getDatacenter () /** * @param string $datacenter */ - public function setDatacenter ($datacenter) + public function setDatacenter($datacenter) { $this->datacenter = $datacenter; } @@ -43,7 +43,7 @@ public function setDatacenter ($datacenter) /** * @return string */ - public function getNode () + public function getNode() { return $this->node; } @@ -51,7 +51,7 @@ public function getNode () /** * @param string $node */ - public function setNode ($node) + public function setNode($node) { $this->node = $node; } @@ -59,7 +59,7 @@ public function setNode ($node) /** * @return string */ - public function getCheckID () + public function getCheckID() { return $this->checkID; } @@ -67,7 +67,7 @@ public function getCheckID () /** * @param string $checkID */ - public function setCheckID ($checkID) + public function setCheckID($checkID) { $this->checkID = $checkID; } @@ -75,7 +75,7 @@ public function setCheckID ($checkID) /** * @return string */ - public function getServiceID () + public function getServiceID() { return $this->serviceID; } @@ -83,12 +83,12 @@ public function getServiceID () /** * @param string $serviceID */ - public function setServiceID ($serviceID) + public function setServiceID($serviceID) { $this->serviceID = $serviceID; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'Node' => 'node', @@ -97,4 +97,4 @@ protected function setKeyMapping (): array 'ServiceID' => 'serviceID', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Catalog/Node.php b/src/Request/Catalog/Node.php index b95b334..90b146c 100644 --- a/src/Request/Catalog/Node.php +++ b/src/Request/Catalog/Node.php @@ -67,4 +67,4 @@ public function setFilter(string $filter): void { $this->filter = $filter; } -} \ No newline at end of file +} diff --git a/src/Request/Catalog/Nodes.php b/src/Request/Catalog/Nodes.php index a9d95a2..152e3f6 100644 --- a/src/Request/Catalog/Nodes.php +++ b/src/Request/Catalog/Nodes.php @@ -51,7 +51,7 @@ public function setDc(string $dc): void */ public function getNear(): ?string { - + return $this->near; } /** @@ -101,4 +101,4 @@ protected function setKeyMapping(): array { return ['node-meta' => 'node_meta']; } -} \ No newline at end of file +} diff --git a/src/Request/Catalog/Register.php b/src/Request/Catalog/Register.php index 50b5890..a8aeafa 100644 --- a/src/Request/Catalog/Register.php +++ b/src/Request/Catalog/Register.php @@ -49,7 +49,7 @@ class Register extends BaseCommand /** * @return string */ - public function getId () + public function getId() { return $this->id; } @@ -57,7 +57,7 @@ public function getId () /** * @param string $id */ - public function setId ($id) + public function setId($id) { $this->id = $id; } @@ -65,7 +65,7 @@ public function setId ($id) /** * @return string */ - public function getNode () + public function getNode() { return $this->node; } @@ -73,7 +73,7 @@ public function getNode () /** * @param string $node */ - public function setNode ($node) + public function setNode($node) { $this->node = $node; } @@ -81,7 +81,7 @@ public function setNode ($node) /** * @return string */ - public function getAddress () + public function getAddress() { return $this->address; } @@ -89,7 +89,7 @@ public function getAddress () /** * @param string $address */ - public function setAddress ($address) + public function setAddress($address) { $this->address = $address; } @@ -97,7 +97,7 @@ public function setAddress ($address) /** * @return string */ - public function getDatacenter () + public function getDatacenter() { return $this->datacenter; } @@ -105,7 +105,7 @@ public function getDatacenter () /** * @param string $datacenter */ - public function setDatacenter ($datacenter) + public function setDatacenter($datacenter) { $this->datacenter = $datacenter; } @@ -113,7 +113,7 @@ public function setDatacenter ($datacenter) /** * @return array */ - public function getTaggedAddresses () + public function getTaggedAddresses() { return $this->taggedAddresses; } @@ -121,7 +121,7 @@ public function getTaggedAddresses () /** * @param array $taggedAddresses */ - public function setTaggedAddresses ($taggedAddresses) + public function setTaggedAddresses($taggedAddresses) { $this->taggedAddresses = json_encode($taggedAddresses); } @@ -129,7 +129,7 @@ public function setTaggedAddresses ($taggedAddresses) /** * @return array */ - public function getNodeMeta () + public function getNodeMeta() { return $this->nodeMeta; } @@ -137,7 +137,7 @@ public function getNodeMeta () /** * @param array $nodeMeta */ - public function setNodeMeta ($nodeMeta) + public function setNodeMeta($nodeMeta) { $this->nodeMeta = json_encode($nodeMeta); } @@ -145,7 +145,7 @@ public function setNodeMeta ($nodeMeta) /** * @return array */ - public function getService () + public function getService() { return $this->service; } @@ -153,7 +153,7 @@ public function getService () /** * @param array $service */ - public function setService ($service) + public function setService($service) { $this->service = json_encode($service); } @@ -161,7 +161,7 @@ public function setService ($service) /** * @return array */ - public function getCheck () + public function getCheck() { return $this->check; } @@ -169,7 +169,7 @@ public function getCheck () /** * @param array $check */ - public function setCheck ($check) + public function setCheck($check) { $this->check = json_encode($check); } @@ -177,7 +177,7 @@ public function setCheck ($check) /** * @return bool */ - public function isSkipNodeUpdate () + public function isSkipNodeUpdate() { return $this->skipNodeUpdate; } @@ -185,12 +185,12 @@ public function isSkipNodeUpdate () /** * @param bool $skipNodeUpdate */ - public function setSkipNodeUpdate ($skipNodeUpdate) + public function setSkipNodeUpdate($skipNodeUpdate) { $this->skipNodeUpdate = $skipNodeUpdate; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'ID' => 'id', @@ -204,4 +204,4 @@ protected function setKeyMapping (): array 'SkipNodeUpdate' => 'skipNodeUpdate', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Catalog/Service.php b/src/Request/Catalog/Service.php index 1edc7b9..18d0150 100644 --- a/src/Request/Catalog/Service.php +++ b/src/Request/Catalog/Service.php @@ -132,4 +132,4 @@ public function setKeyMapping(): array { return ['node-meta' => 'node_meta']; } -} \ No newline at end of file +} diff --git a/src/Request/Catalog/Services.php b/src/Request/Catalog/Services.php index 629270d..6b857f0 100644 --- a/src/Request/Catalog/Services.php +++ b/src/Request/Catalog/Services.php @@ -56,5 +56,4 @@ protected function setKeyMapping(): array { return ['node-meta' => 'node_meta']; } - -} \ No newline at end of file +} diff --git a/src/Request/Config.php b/src/Request/Config.php index 34062ff..e246deb 100644 --- a/src/Request/Config.php +++ b/src/Request/Config.php @@ -68,7 +68,7 @@ public function setCas(int $cas): void /** * @return string */ - public function getKind () + public function getKind() { return $this->kind; } @@ -76,7 +76,7 @@ public function getKind () /** * @param string $kind */ - public function setKind ($kind) + public function setKind($kind) { $this->kind = $kind; } @@ -84,7 +84,7 @@ public function setKind ($kind) /** * @return string */ - public function getName () + public function getName() { return $this->name; } @@ -92,7 +92,7 @@ public function getName () /** * @param string $name */ - public function setName ($name) + public function setName($name) { $this->name = $name; } @@ -100,7 +100,7 @@ public function setName ($name) /** * @return string */ - public function getProtocol () + public function getProtocol() { return $this->protocol; } @@ -108,13 +108,11 @@ public function getProtocol () /** * @param string $protocol */ - public function setProtocol ($protocol) + public function setProtocol($protocol) { $this->protocol = $protocol; } - - public function setKeyMapping(): array { return [ @@ -123,4 +121,4 @@ public function setKeyMapping(): array 'Protocol' => 'protocol', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Connect/Ca/Configuration.php b/src/Request/Connect/Ca/Configuration.php index 1f44641..c19fd90 100644 --- a/src/Request/Connect/Ca/Configuration.php +++ b/src/Request/Connect/Ca/Configuration.php @@ -39,7 +39,7 @@ class Configuration extends BaseCommand /** * @return string */ - public function getProvider () + public function getProvider() { return $this->provider; } @@ -47,7 +47,7 @@ public function getProvider () /** * @param string $provider */ - public function setProvider ($provider) + public function setProvider($provider) { $this->provider = $provider; } @@ -55,7 +55,7 @@ public function setProvider ($provider) /** * @return array */ - public function getConfig () + public function getConfig() { return $this->config; } @@ -63,16 +63,16 @@ public function getConfig () /** * @param array $config */ - public function setConfig ($config) + public function setConfig($config) { $this->config = $config; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'Provider' => 'provider', 'Config' => 'config', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Connect/Ca/Roots.php b/src/Request/Connect/Ca/Roots.php index ecbd540..5c87b45 100644 --- a/src/Request/Connect/Ca/Roots.php +++ b/src/Request/Connect/Ca/Roots.php @@ -12,4 +12,4 @@ class Roots extends BaseCommand { protected $url = 'connect/ca/roots'; -} \ No newline at end of file +} diff --git a/src/Request/Connect/Intentions.php b/src/Request/Connect/Intentions.php index 638e225..b8da369 100644 --- a/src/Request/Connect/Intentions.php +++ b/src/Request/Connect/Intentions.php @@ -56,7 +56,7 @@ class Intentions extends BaseCommand /** * @return string */ - public function getUuid () + public function getUuid() { return $this->uuid; } @@ -64,7 +64,7 @@ public function getUuid () /** * @param string $uuid */ - public function setUuid ($uuid) + public function setUuid($uuid) { $this->uuid = $uuid; } @@ -72,7 +72,7 @@ public function setUuid ($uuid) /** * @return string */ - public function getSourceName () + public function getSourceName() { return $this->sourceName; } @@ -80,7 +80,7 @@ public function getSourceName () /** * @param string $sourceName */ - public function setSourceName ($sourceName) + public function setSourceName($sourceName) { $this->sourceName = $sourceName; } @@ -88,7 +88,7 @@ public function setSourceName ($sourceName) /** * @return string */ - public function getDestinationName () + public function getDestinationName() { return $this->destinationName; } @@ -96,7 +96,7 @@ public function getDestinationName () /** * @param string $destinationName */ - public function setDestinationName ($destinationName) + public function setDestinationName($destinationName) { $this->destinationName = $destinationName; } @@ -104,7 +104,7 @@ public function setDestinationName ($destinationName) /** * @return string */ - public function getSourceType () + public function getSourceType() { return $this->sourceType; } @@ -112,7 +112,7 @@ public function getSourceType () /** * @param string $sourceType */ - public function setSourceType ($sourceType) + public function setSourceType($sourceType) { $this->sourceType = $sourceType; } @@ -120,7 +120,7 @@ public function setSourceType ($sourceType) /** * @return string */ - public function getAction () + public function getAction() { return $this->action; } @@ -128,7 +128,7 @@ public function getAction () /** * @param string $action */ - public function setAction ($action) + public function setAction($action) { $this->action = $action; } @@ -136,7 +136,7 @@ public function setAction ($action) /** * @return string */ - public function getDescription () + public function getDescription() { return $this->description; } @@ -144,7 +144,7 @@ public function getDescription () /** * @param string $description */ - public function setDescription ($description) + public function setDescription($description) { $this->description = $description; } @@ -152,7 +152,7 @@ public function setDescription ($description) /** * @return string */ - public function getMeta () + public function getMeta() { return $this->meta; } @@ -160,12 +160,12 @@ public function getMeta () /** * @param string $meta */ - public function setMeta ($meta) + public function setMeta($meta) { $this->meta = $meta; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'SourceName' => 'sourceName', diff --git a/src/Request/Connect/Intentions/Check.php b/src/Request/Connect/Intentions/Check.php index eff60ef..80e6c48 100644 --- a/src/Request/Connect/Intentions/Check.php +++ b/src/Request/Connect/Intentions/Check.php @@ -54,4 +54,4 @@ public function setDestination(string $destination): void { $this->destination = $destination; } -} \ No newline at end of file +} diff --git a/src/Request/Connect/Intentions/Match.php b/src/Request/Connect/Intentions/Match.php index bc228f2..1b9e3e0 100644 --- a/src/Request/Connect/Intentions/Match.php +++ b/src/Request/Connect/Intentions/Match.php @@ -53,4 +53,4 @@ public function setName(string $name): void { $this->name = $name; } -} \ No newline at end of file +} diff --git a/src/Request/Coordinate/Datacenters.php b/src/Request/Coordinate/Datacenters.php index b9abc9c..d0cf4f6 100644 --- a/src/Request/Coordinate/Datacenters.php +++ b/src/Request/Coordinate/Datacenters.php @@ -9,7 +9,7 @@ use EasySwoole\Consul\Request\BaseCommand; -class Datacenters extends BaseCommand +class DataCenters extends BaseCommand { protected $url = 'coordinate/datacenters'; -} \ No newline at end of file +} diff --git a/src/Request/Coordinate/Node.php b/src/Request/Coordinate/Node.php index 5ecc105..3825c14 100644 --- a/src/Request/Coordinate/Node.php +++ b/src/Request/Coordinate/Node.php @@ -8,7 +8,6 @@ namespace EasySwoole\Consul\Request\Coordinate; use EasySwoole\Consul\Request\BaseCommand; -use EasySwoole\Spl\SplBean; class Node extends BaseCommand { @@ -73,4 +72,4 @@ public function setNode(string $node): void { $this->node = $node; } -} \ No newline at end of file +} diff --git a/src/Request/Coordinate/Nodes.php b/src/Request/Coordinate/Nodes.php index 2c12173..8d3fb7b 100644 --- a/src/Request/Coordinate/Nodes.php +++ b/src/Request/Coordinate/Nodes.php @@ -52,4 +52,4 @@ public function setSegment(string $segment): void { $this->segment = $segment; } -} \ No newline at end of file +} diff --git a/src/Request/Coordinate/Update.php b/src/Request/Coordinate/Update.php index 5d2f212..b4fad1c 100644 --- a/src/Request/Coordinate/Update.php +++ b/src/Request/Coordinate/Update.php @@ -50,7 +50,7 @@ class Update extends BaseCommand /** * @return string */ - public function getDc () + public function getDc() { return $this->dc; } @@ -58,7 +58,7 @@ public function getDc () /** * @param string $dc */ - public function setDc ($dc) + public function setDc($dc) { $this->dc = $dc; } @@ -66,7 +66,7 @@ public function setDc ($dc) /** * @return string */ - public function getSegment () + public function getSegment() { return $this->segment; } @@ -74,7 +74,7 @@ public function getSegment () /** * @param string $segment */ - public function setSegment ($segment) + public function setSegment($segment) { $this->segment = $segment; } @@ -82,7 +82,7 @@ public function setSegment ($segment) /** * @return array */ - public function getNode () + public function getNode() { return $this->node; } @@ -90,7 +90,7 @@ public function getNode () /** * @param array $node */ - public function setNode ($node) + public function setNode($node) { $this->node = $node; } @@ -98,7 +98,7 @@ public function setNode ($node) /** * @return array */ - public function getCoord () + public function getCoord() { return $this->coord; } @@ -106,12 +106,12 @@ public function getCoord () /** * @param array $coord */ - public function setCoord ($coord) + public function setCoord($coord) { $this->coord = json_encode($coord); } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'Node' => 'node', @@ -119,4 +119,4 @@ protected function setKeyMapping (): array 'Coord' => 'coord', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Event/Fire.php b/src/Request/Event/Fire.php index 043f73d..9dce0c2 100644 --- a/src/Request/Event/Fire.php +++ b/src/Request/Event/Fire.php @@ -112,4 +112,4 @@ public function setTag(string $tag): void { $this->tag = $tag; } -} \ No newline at end of file +} diff --git a/src/Request/Event/ListEvent.php b/src/Request/Event/ListEvent.php index 734ff4d..686c48c 100644 --- a/src/Request/Event/ListEvent.php +++ b/src/Request/Event/ListEvent.php @@ -93,4 +93,4 @@ public function setTag(string $tag): void { $this->tag = $tag; } -} \ No newline at end of file +} diff --git a/src/Request/Health/Checks.php b/src/Request/Health/Checks.php index 3027691..5352925 100644 --- a/src/Request/Health/Checks.php +++ b/src/Request/Health/Checks.php @@ -116,4 +116,4 @@ public function setKeyMapping(): array { return ['node-meta' => 'node_meta']; } -} \ No newline at end of file +} diff --git a/src/Request/Health/Connect.php b/src/Request/Health/Connect.php index cd960d2..af4d06a 100644 --- a/src/Request/Health/Connect.php +++ b/src/Request/Health/Connect.php @@ -154,4 +154,4 @@ public function setKeyMapping(): array { return ['node_meta' => 'node-meta']; } -} \ No newline at end of file +} diff --git a/src/Request/Health/Node.php b/src/Request/Health/Node.php index 2a5151b..698c0f7 100644 --- a/src/Request/Health/Node.php +++ b/src/Request/Health/Node.php @@ -68,4 +68,4 @@ public function setFilter(string $filter): void { $this->filter = $filter; } -} \ No newline at end of file +} diff --git a/src/Request/Health/Service.php b/src/Request/Health/Service.php index 4b014d9..948e42a 100644 --- a/src/Request/Health/Service.php +++ b/src/Request/Health/Service.php @@ -154,4 +154,4 @@ public function setKeyMapping(): array { return ['node-meta' => 'node_meta']; } -} \ No newline at end of file +} diff --git a/src/Request/Health/State.php b/src/Request/Health/State.php index e50cac3..b220565 100644 --- a/src/Request/Health/State.php +++ b/src/Request/Health/State.php @@ -116,4 +116,4 @@ public function setKeyMapping(): array { return ['node_meta' => 'node-meta']; } -} \ No newline at end of file +} diff --git a/src/Request/Kv.php b/src/Request/Kv.php index 8a2be74..f4832a6 100644 --- a/src/Request/Kv.php +++ b/src/Request/Kv.php @@ -183,7 +183,7 @@ public function setCas(int $cas): void * @return null|string * */ - public function getAcquire(): ?string + public function getAcquire(): ?string { return $this->acquire; } @@ -192,7 +192,7 @@ public function getAcquire(): ?string * @param string $acquire * */ - public function setAcquire(string $acquire): void + public function setAcquire(string $acquire): void { $this->acquire = $acquire; } @@ -213,4 +213,4 @@ public function setRelease(string $release): void { $this->release = $release; } -} \ No newline at end of file +} diff --git a/src/Request/Operator/Area.php b/src/Request/Operator/Area.php index 3a232f0..d0dbfcc 100644 --- a/src/Request/Operator/Area.php +++ b/src/Request/Operator/Area.php @@ -48,7 +48,7 @@ class Area extends BaseCommand /** * @return string */ - public function getDc () + public function getDc() { return $this->dc; } @@ -56,7 +56,7 @@ public function getDc () /** * @param string $dc */ - public function setDc ($dc) + public function setDc($dc) { $this->dc = $dc; } @@ -64,7 +64,7 @@ public function setDc ($dc) /** * @return string */ - public function getPeerDatacenter () + public function getPeerDatacenter() { return $this->peerDatacenter; } @@ -72,7 +72,7 @@ public function getPeerDatacenter () /** * @param string $peerDatacenter */ - public function setPeerDatacenter ($peerDatacenter) + public function setPeerDatacenter($peerDatacenter) { $this->peerDatacenter = $peerDatacenter; } @@ -80,7 +80,7 @@ public function setPeerDatacenter ($peerDatacenter) /** * @return array */ - public function getRetryJoin () + public function getRetryJoin() { return $this->retryJoin; } @@ -88,7 +88,7 @@ public function getRetryJoin () /** * @param array $retryJoin */ - public function setRetryJoin ($retryJoin) + public function setRetryJoin($retryJoin) { $this->retryJoin = $retryJoin; } @@ -96,7 +96,7 @@ public function setRetryJoin ($retryJoin) /** * @return bool */ - public function isUseTLS () + public function isUseTLS() { return $this->useTLS; } @@ -104,7 +104,7 @@ public function isUseTLS () /** * @param bool $useTLS */ - public function setUseTLS ($useTLS) + public function setUseTLS($useTLS) { $this->useTLS = $useTLS; } @@ -112,7 +112,7 @@ public function setUseTLS ($useTLS) /** * @return string */ - public function getUuid () + public function getUuid() { return $this->uuid; } @@ -120,11 +120,11 @@ public function getUuid () /** * @param string $uuid */ - public function setUuid ($uuid) + public function setUuid($uuid) { $this->uuid = $uuid; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'PeerDatacenter' => 'peerDatacenter', @@ -132,4 +132,4 @@ protected function setKeyMapping (): array 'UseTLS' => 'useTLS', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Operator/Autopilot/Configuration.php b/src/Request/Operator/Autopilot/Configuration.php index 952b2f4..6f7f70a 100644 --- a/src/Request/Operator/Autopilot/Configuration.php +++ b/src/Request/Operator/Autopilot/Configuration.php @@ -97,7 +97,7 @@ public function getCas(): ?int /** * @param int $cas */ - public function setCas(int $cas): void + public function setCas(int $cas): void { $this->cas = $cas; } @@ -105,7 +105,7 @@ public function setCas(int $cas): void /** * @return bool */ - public function isCleanupDeadServers () + public function isCleanupDeadServers() { return $this->cleanupDeadServers; } @@ -113,7 +113,7 @@ public function isCleanupDeadServers () /** * @param bool $cleanupDeadServers */ - public function setCleanupDeadServers ($cleanupDeadServers) + public function setCleanupDeadServers($cleanupDeadServers) { $this->cleanupDeadServers = $cleanupDeadServers; } @@ -121,7 +121,7 @@ public function setCleanupDeadServers ($cleanupDeadServers) /** * @return string */ - public function getLastContactThreshold () + public function getLastContactThreshold() { return $this->lastContactThreshold; } @@ -129,7 +129,7 @@ public function getLastContactThreshold () /** * @param string $lastContactThreshold */ - public function setLastContactThreshold ($lastContactThreshold) + public function setLastContactThreshold($lastContactThreshold) { $this->lastContactThreshold = $lastContactThreshold; } @@ -137,7 +137,7 @@ public function setLastContactThreshold ($lastContactThreshold) /** * @return int */ - public function getMaxTrailingLogs () + public function getMaxTrailingLogs() { return $this->maxTrailingLogs; } @@ -145,7 +145,7 @@ public function getMaxTrailingLogs () /** * @param int $maxTrailingLogs */ - public function setMaxTrailingLogs ($maxTrailingLogs) + public function setMaxTrailingLogs($maxTrailingLogs) { $this->maxTrailingLogs = $maxTrailingLogs; } @@ -153,7 +153,7 @@ public function setMaxTrailingLogs ($maxTrailingLogs) /** * @return string */ - public function getServerStabilizationTime () + public function getServerStabilizationTime() { return $this->serverStabilizationTime; } @@ -161,7 +161,7 @@ public function getServerStabilizationTime () /** * @param string $serverStabilizationTime */ - public function setServerStabilizationTime ($serverStabilizationTime) + public function setServerStabilizationTime($serverStabilizationTime) { $this->serverStabilizationTime = $serverStabilizationTime; } @@ -169,7 +169,7 @@ public function setServerStabilizationTime ($serverStabilizationTime) /** * @return string */ - public function getRedundancyZoneTag () + public function getRedundancyZoneTag() { return $this->redundancyZoneTag; } @@ -177,7 +177,7 @@ public function getRedundancyZoneTag () /** * @param string $redundancyZoneTag */ - public function setRedundancyZoneTag ($redundancyZoneTag) + public function setRedundancyZoneTag($redundancyZoneTag) { $this->redundancyZoneTag = $redundancyZoneTag; } @@ -185,7 +185,7 @@ public function setRedundancyZoneTag ($redundancyZoneTag) /** * @return bool */ - public function isDisableUpgradeMigration () + public function isDisableUpgradeMigration() { return $this->disableUpgradeMigration; } @@ -193,7 +193,7 @@ public function isDisableUpgradeMigration () /** * @param bool $disableUpgradeMigration */ - public function setDisableUpgradeMigration ($disableUpgradeMigration) + public function setDisableUpgradeMigration($disableUpgradeMigration) { $this->disableUpgradeMigration = $disableUpgradeMigration; } @@ -201,7 +201,7 @@ public function setDisableUpgradeMigration ($disableUpgradeMigration) /** * @return string */ - public function getUpgradeVersionTag () + public function getUpgradeVersionTag() { return $this->upgradeVersionTag; } @@ -209,12 +209,12 @@ public function getUpgradeVersionTag () /** * @param string $upgradeVersionTag */ - public function setUpgradeVersionTag ($upgradeVersionTag) + public function setUpgradeVersionTag($upgradeVersionTag) { $this->upgradeVersionTag = $upgradeVersionTag; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'CleanupDeadServers' => 'cleanupDeadServers', @@ -226,4 +226,4 @@ protected function setKeyMapping (): array 'UpgradeVersionTag' => 'upgradeVersionTag', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Operator/Autopilot/Health.php b/src/Request/Operator/Autopilot/Health.php index 2f3080a..191d35f 100644 --- a/src/Request/Operator/Autopilot/Health.php +++ b/src/Request/Operator/Autopilot/Health.php @@ -34,4 +34,4 @@ public function setDc(string $dc): ?string { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Operator/Keyring.php b/src/Request/Operator/Keyring.php index 6580c31..0f0406a 100644 --- a/src/Request/Operator/Keyring.php +++ b/src/Request/Operator/Keyring.php @@ -62,7 +62,7 @@ public function setKey(string $Key): void /** * @return bool */ - public function isLocalOnly () + public function isLocalOnly() { return $this->localOnly; } @@ -70,7 +70,7 @@ public function isLocalOnly () /** * @param bool $localOnly */ - public function setLocalOnly ($localOnly) + public function setLocalOnly($localOnly) { $this->localOnly = $localOnly; } @@ -85,4 +85,4 @@ public function setKeyMapping(): array 'local-only' => 'localOnly', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Operator/License.php b/src/Request/Operator/License.php index fb3b315..fb794cc 100644 --- a/src/Request/Operator/License.php +++ b/src/Request/Operator/License.php @@ -33,4 +33,4 @@ public function setDc(string $dc): void { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Operator/Raft/Configuration.php b/src/Request/Operator/Raft/Configuration.php index f6daef3..3409788 100644 --- a/src/Request/Operator/Raft/Configuration.php +++ b/src/Request/Operator/Raft/Configuration.php @@ -53,4 +53,4 @@ public function setStale(bool $stale): void { $this->stale = $stale; } -} \ No newline at end of file +} diff --git a/src/Request/Operator/Raft/Peer.php b/src/Request/Operator/Raft/Peer.php index fbcc23d..83691fc 100644 --- a/src/Request/Operator/Raft/Peer.php +++ b/src/Request/Operator/Raft/Peer.php @@ -73,4 +73,4 @@ public function setAddress(string $address): void { $this->address = $address; } -} \ No newline at end of file +} diff --git a/src/Request/Operator/Segment.php b/src/Request/Operator/Segment.php index 9ffc1a4..11925e6 100644 --- a/src/Request/Operator/Segment.php +++ b/src/Request/Operator/Segment.php @@ -33,4 +33,4 @@ public function setDc($dc) { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Query.php b/src/Request/Query.php index 763ed71..e30e9e2 100644 --- a/src/Request/Query.php +++ b/src/Request/Query.php @@ -69,7 +69,7 @@ class Query extends BaseCommand /** * @return string */ - public function getDc () + public function getDc() { return $this->dc; } @@ -77,7 +77,7 @@ public function getDc () /** * @param string $dc */ - public function setDc ($dc) + public function setDc($dc) { $this->dc = $dc; } @@ -85,7 +85,7 @@ public function setDc ($dc) /** * @return string */ - public function getName () + public function getName() { return $this->name; } @@ -93,7 +93,7 @@ public function getName () /** * @param string $name */ - public function setName ($name) + public function setName($name) { $this->name = $name; } @@ -101,7 +101,7 @@ public function setName ($name) /** * @return string */ - public function getSession () + public function getSession() { return $this->session; } @@ -109,7 +109,7 @@ public function getSession () /** * @param string $session */ - public function setSession ($session) + public function setSession($session) { $this->session = $session; } @@ -117,7 +117,7 @@ public function setSession ($session) /** * @return string */ - public function getToken () + public function getToken() { return $this->token; } @@ -125,7 +125,7 @@ public function getToken () /** * @param string $token */ - public function setToken ($token) + public function setToken($token) { $this->token = $token; } @@ -133,7 +133,7 @@ public function setToken ($token) /** * @return array */ - public function getService () + public function getService() { return $this->service; } @@ -141,7 +141,7 @@ public function getService () /** * @param array $service */ - public function setService ($service) + public function setService($service) { $this->service = json_encode($service); } @@ -149,7 +149,7 @@ public function setService ($service) /** * @return string */ - public function getDNS () + public function getDNS() { return $this->DNS; } @@ -157,7 +157,7 @@ public function getDNS () /** * @param string $DNS */ - public function setDNS ($DNS) + public function setDNS($DNS) { $this->DNS = json_encode($DNS); } @@ -165,7 +165,7 @@ public function setDNS ($DNS) /** * @return string */ - public function getUuid () + public function getUuid() { return $this->uuid; } @@ -173,14 +173,14 @@ public function getUuid () /** * @param string $uuid */ - public function setUuid ($uuid) + public function setUuid($uuid) { $this->uuid = $uuid; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'Name' => 'name', @@ -189,4 +189,4 @@ protected function setKeyMapping (): array 'Service' => 'service', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Query/Execute.php b/src/Request/Query/Execute.php index dc9403a..acbb452 100644 --- a/src/Request/Query/Execute.php +++ b/src/Request/Query/Execute.php @@ -113,4 +113,4 @@ public function setConnect(bool $connect): void { $this->connect = $connect; } -} \ No newline at end of file +} diff --git a/src/Request/Query/Explain.php b/src/Request/Query/Explain.php index 3e2953b..d803089 100644 --- a/src/Request/Query/Explain.php +++ b/src/Request/Query/Explain.php @@ -53,4 +53,4 @@ public function setDc(string $dc): void { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Session/Create.php b/src/Request/Session/Create.php index 82ba266..5ba4639 100644 --- a/src/Request/Session/Create.php +++ b/src/Request/Session/Create.php @@ -60,7 +60,7 @@ class Create extends BaseCommand /** * @return string */ - public function getDc () + public function getDc() { return $this->dc; } @@ -68,7 +68,7 @@ public function getDc () /** * @param string $dc */ - public function setDc ($dc) + public function setDc($dc) { $this->dc = $dc; } @@ -76,7 +76,7 @@ public function setDc ($dc) /** * @return string */ - public function getLockDelay () + public function getLockDelay() { return $this->lockDelay; } @@ -84,7 +84,7 @@ public function getLockDelay () /** * @param string $lockDelay */ - public function setLockDelay ($lockDelay) + public function setLockDelay($lockDelay) { $this->lockDelay = $lockDelay; } @@ -92,7 +92,7 @@ public function setLockDelay ($lockDelay) /** * @return string */ - public function getNode () + public function getNode() { return $this->node; } @@ -100,7 +100,7 @@ public function getNode () /** * @param string $node */ - public function setNode ($node) + public function setNode($node) { $this->node = $node; } @@ -108,7 +108,7 @@ public function setNode ($node) /** * @return string */ - public function getName () + public function getName() { return $this->name; } @@ -116,7 +116,7 @@ public function getName () /** * @param string $name */ - public function setName ($name) + public function setName($name) { $this->name = $name; } @@ -124,7 +124,7 @@ public function setName ($name) /** * @return array */ - public function getChecks () + public function getChecks() { return $this->checks; } @@ -132,7 +132,7 @@ public function getChecks () /** * @param array $checks */ - public function setChecks ($checks) + public function setChecks($checks) { $this->checks = $checks; } @@ -140,7 +140,7 @@ public function setChecks ($checks) /** * @return string */ - public function getBehavior () + public function getBehavior() { return $this->behavior; } @@ -148,7 +148,7 @@ public function getBehavior () /** * @param string $behavior */ - public function setBehavior ($behavior) + public function setBehavior($behavior) { $this->behavior = $behavior; } @@ -156,7 +156,7 @@ public function setBehavior ($behavior) /** * @return string */ - public function getTTL () + public function getTTL() { return $this->TTL; } @@ -164,12 +164,12 @@ public function getTTL () /** * @param string $TTL */ - public function setTTL ($TTL) + public function setTTL($TTL) { $this->TTL = $TTL; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'LockDelay' => 'LockDelay', @@ -179,4 +179,4 @@ protected function setKeyMapping (): array 'Behavior' => 'behavior', ]; } -} \ No newline at end of file +} diff --git a/src/Request/Session/Destroy.php b/src/Request/Session/Destroy.php index a996df2..66ff091 100644 --- a/src/Request/Session/Destroy.php +++ b/src/Request/Session/Destroy.php @@ -53,4 +53,4 @@ public function setDc(string $dc): void { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Session/Info.php b/src/Request/Session/Info.php index 8013735..9e831bb 100644 --- a/src/Request/Session/Info.php +++ b/src/Request/Session/Info.php @@ -53,4 +53,4 @@ public function setDc(string $dc): void { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Session/Node.php b/src/Request/Session/Node.php index f07c81c..a421ab6 100644 --- a/src/Request/Session/Node.php +++ b/src/Request/Session/Node.php @@ -53,4 +53,4 @@ public function setDc(string $dc): void { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Session/Renew.php b/src/Request/Session/Renew.php index 16979ac..0fae933 100644 --- a/src/Request/Session/Renew.php +++ b/src/Request/Session/Renew.php @@ -53,4 +53,4 @@ public function setDc(string $dc): void { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Session/SessionList.php b/src/Request/Session/SessionList.php index 831a89e..3a5f652 100644 --- a/src/Request/Session/SessionList.php +++ b/src/Request/Session/SessionList.php @@ -33,4 +33,4 @@ public function setDc(string $dc):void { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Snapshot.php b/src/Request/Snapshot.php index a107037..8d1ea12 100644 --- a/src/Request/Snapshot.php +++ b/src/Request/Snapshot.php @@ -51,4 +51,4 @@ public function setStale(string $stale): void { $this->stale = $stale; } -} \ No newline at end of file +} diff --git a/src/Request/Status/Leader.php b/src/Request/Status/Leader.php index 2b915a2..4430d74 100644 --- a/src/Request/Status/Leader.php +++ b/src/Request/Status/Leader.php @@ -33,4 +33,4 @@ public function setDc(string $dc): void { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Status/Peers.php b/src/Request/Status/Peers.php index 820bcc5..94d44b5 100644 --- a/src/Request/Status/Peers.php +++ b/src/Request/Status/Peers.php @@ -33,4 +33,4 @@ public function setDc(string $dc): void { $this->dc = $dc; } -} \ No newline at end of file +} diff --git a/src/Request/Txn.php b/src/Request/Txn.php index 57f955f..72ef1c5 100644 --- a/src/Request/Txn.php +++ b/src/Request/Txn.php @@ -95,7 +95,7 @@ class Txn extends BaseCommand /** * @return string */ - public function getDc () + public function getDc() { return $this->dc; } @@ -103,7 +103,7 @@ public function getDc () /** * @param string $dc */ - public function setDc ($dc) + public function setDc($dc) { $this->dc = $dc; } @@ -111,7 +111,7 @@ public function setDc ($dc) /** * @return array */ - public function getKv () + public function getKv() { return $this->kv; } @@ -119,7 +119,7 @@ public function getKv () /** * @param array $kv */ - public function setKv ($kv) + public function setKv($kv) { $this->kv = $kv; } @@ -127,7 +127,7 @@ public function setKv ($kv) /** * @return array */ - public function getNode () + public function getNode() { return $this->node; } @@ -135,7 +135,7 @@ public function getNode () /** * @param array $node */ - public function setNode ($node) + public function setNode($node) { $this->node = $node; } @@ -143,7 +143,7 @@ public function setNode ($node) /** * @return array */ - public function getService () + public function getService() { return $this->service; } @@ -151,7 +151,7 @@ public function getService () /** * @param array $service */ - public function setService ($service) + public function setService($service) { $this->service = $service; } @@ -159,7 +159,7 @@ public function setService ($service) /** * @return array */ - public function getCheck () + public function getCheck() { return $this->check; } @@ -167,12 +167,12 @@ public function getCheck () /** * @param array $check */ - public function setCheck ($check) + public function setCheck($check) { $this->check = $check; } - protected function setKeyMapping (): array + protected function setKeyMapping(): array { return [ 'KV' => 'kv', @@ -181,4 +181,4 @@ protected function setKeyMapping (): array 'Check' => 'check', ]; } -} \ No newline at end of file +} diff --git a/src/Session.php b/src/Session.php index a8c2f66..0b5f811 100644 --- a/src/Session.php +++ b/src/Session.php @@ -107,4 +107,4 @@ public function renew(Renew $renew) $renew->setUuid(''); return $this->putJSON($renew); } -} \ No newline at end of file +} diff --git a/src/Snapshot.php b/src/Snapshot.php index 0828f15..b9f163d 100644 --- a/src/Snapshot.php +++ b/src/Snapshot.php @@ -18,7 +18,8 @@ class Snapshot extends BaseFunc implements SnapshotInterface * @return mixed * @throws \EasySwoole\HttpClient\Exception\InvalidUrl */ - public function generate(snap $snapshot) { + public function generate(snap $snapshot) + { return $this->getJson($snapshot); } @@ -32,4 +33,4 @@ public function restore(snap $snapshot) { return $this->putJSON($snapshot); } -} \ No newline at end of file +} diff --git a/src/Status.php b/src/Status.php index 0fcd7e3..1b95383 100644 --- a/src/Status.php +++ b/src/Status.php @@ -34,4 +34,4 @@ public function peers(Peers $peers) { return $this->getJson($peers); } -} \ No newline at end of file +} diff --git a/src/Transaction.php b/src/Transaction.php index 7b5ec50..e3c96eb 100644 --- a/src/Transaction.php +++ b/src/Transaction.php @@ -22,4 +22,4 @@ public function create(Txn $txn) { return $this->putJSON($txn); } -} \ No newline at end of file +} diff --git a/tests/AclTest.php b/tests/AclTest.php index d00da1e..214be39 100644 --- a/tests/AclTest.php +++ b/tests/AclTest.php @@ -1,5 +1,6 @@ config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); - } - function testBootstrap() + public function testBootstrap() { $bootstrap = new Bootstrap(); $this->consul->acl()->bootstrap($bootstrap); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReplication() + public function testReplication() { $replication = new Replication(); $this->consul->acl()->replication($replication); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testTranslate() + public function testTranslate() { $translate = new Translate([ 'accessor_id' => '4f48f7e6-9359-4890-8e67-6144a962b0a5' ]); $this->consul->acl()->translate($translate); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - - function testLogin() + public function testLogin() { $login = new Login([ "authMethod" => "minikube", "bearerToken" => "eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9..." ]); $this->consul->acl()->login($login); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testLogout() + public function testLogout() { $logout = new Logout([ 'token' => 'b78d37c7-0ca7-5f4d-99ee-6d9975ce4586' ]); $this->consul->acl()->logout($logout); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testToken() + public function testToken() { $token = new Token([ "description" => "Agent token for 'node1'", @@ -92,28 +90,28 @@ function testToken() "Local" => false, ]); $this->consul->acl()->token($token); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReadToken() + public function testReadToken() { $token = new Token([ "AccessorID" => "6a1253d2-1785-24fd-91c2-f8e78c745511" ]); $this->consul->acl()->readToken($token); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testSelf() + public function testSelf() { $self = new Token\GetSelf([ 'token' => "6a1253d2-1785-24fd-91c2-f8e78c745511" ]); $this->consul->acl()->self($self); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdate() + public function testUpdate() { $update = new Token([ 'accessorID' => '6a1253d2-1785-24fd-91c2-f8e78c745511', @@ -122,37 +120,37 @@ function testUpdate() "local" => false ]); $this->consul->acl()->updateToken($update); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testClone() + public function testClone() { $clone = new Token\CloneToken([ 'accessorID' => '8f246b77-f3e1-ff88-5b48-8ec93abf3e05', "description" => "Clone of Agent token for 'node1'", ]); $this->consul->acl()->cloneToken($clone); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDelete() + public function testDelete() { $delete = new Token([ 'AccessorID' => '8f246b77-f3e1-ff88-5b48-8ec93abf3e05' ]); $this->consul->acl()->delete($delete); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testTokens() + public function testTokens() { $token = new Tokens(); $this->consul->acl()->tokens($token); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testCreateToken() + public function testCreateToken() { $create = new Create([ "Name" => "my-app-token", @@ -160,10 +158,10 @@ function testCreateToken() "rules" => "a" ]); $this->consul->acl()->create($create); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdateToken() + public function testUpdateToken() { $update = new Update([ "id" => "adf4238a-882b-9ddc-4a9d-5b6758e4159e", @@ -172,44 +170,44 @@ function testUpdateToken() "Rules" => "# New Rules", ]); $this->consul->acl()->update($update); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeleteToken() + public function testDeleteToken() { $delete = new Destroy([ 'uuid' => '8f246b77-f3e1-ff88-5b48-8ec93abf3e05' ]); $this->consul->acl()->destroy($delete); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testInfo() + public function testInfo() { $info = new Info([ 'uuid' => '8f246b77-f3e1-ff88-5b48-8ec93abf3e05' ]); $this->consul->acl()->info($info); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testCloneAclToken() + public function testCloneAclToken() { $cloneAclToken = new CloneACLToken([ 'uuid' => '8f246b77-f3e1-ff88-5b48-8ec93abf3e05' ]); $this->consul->acl()->cloneAclToken($cloneAclToken); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testGetList() + public function testGetList() { $getList = new Lists(); $this->consul->acl()->getList($getList); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testPolicy() + public function testPolicy() { $policy = new Policy([ "Name" => "node-read", @@ -218,19 +216,19 @@ function testPolicy() "datacenters" => ["dc1"] ]); $this->consul->acl()->policy($policy); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReadPolicy() + public function testReadPolicy() { $policy = new Policy([ 'id' => 'c01a1f82-44be-41b0-a686-685fb6e0f485', ]); $this->consul->acl()->readPolicy($policy); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdatePolicy() + public function testUpdatePolicy() { $policy = new Policy([ "ID" => "c01a1f82-44be-41b0-a686-685fb6e0f485", @@ -239,80 +237,80 @@ function testUpdatePolicy() "Rules" => "service \"app\" { policy = \"write\"}", ]); $this->consul->acl()->updatePolicy($policy); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeletePolicy() + public function testDeletePolicy() { $policy = new Policy([ 'id' => 'c01a1f82-44be-41b0-a686-685fb6e0f485' ]); $this->consul->acl()->deletePolicy($policy); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testPolicies() + public function testPolicies() { $policies = new Policies(); $this->consul->acl()->policies($policies); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testRole() + public function testRole() { $role = new Role([ "name" => "example-role", "description" => "Showcases all input parameters", ]); $this->consul->acl()->role($role); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReadRole() + public function testReadRole() { $role = new Role([ 'id' => 'aa770e5b-8b0b-7fcf-e5a1-8535fcc388b4' ]); $this->consul->acl()->readRole($role); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReadRoleName() + public function testReadRoleName() { $name = new Role([ 'name' => 'example-role' ]); $this->consul->acl()->readRoleByName($name); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdateRole() + public function testUpdateRole() { $role = new Role([ 'id' => 'aa770e5b-8b0b-7fcf-e5a1-8535fcc388b4', "name" => "example-two", ]); $this->consul->acl()->updateRole($role); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeleteRole() + public function testDeleteRole() { $role = new Role([ 'id' => 'aa770e5b-8b0b-7fcf-e5a1-8535fcc388b4' ]); $this->consul->acl()->deleteRole($role); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testRoles() + public function testRoles() { $roles = new Roles(); $this->consul->acl()->roles($roles); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testMethod() + public function testMethod() { $method = new AuthMethod([ "Name" => "minikube", @@ -325,19 +323,19 @@ function testMethod() ] ]); $this->consul->acl()->authMethod($method); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReadAuthMethod() + public function testReadAuthMethod() { $method = new AuthMethod([ 'name' => 'minikube', ]); $this->consul->acl()->readAuthMethod($method); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdateAuthMethod() + public function testUpdateAuthMethod() { $method = new AuthMethod([ "Name" => "minikube", @@ -350,26 +348,26 @@ function testUpdateAuthMethod() ] ]); $this->consul->acl()->updateAuthMethod($method); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeleteAuthMethod() + public function testDeleteAuthMethod() { $method = new AuthMethod([ "Name" => "minikube", ]); $this->consul->acl()->deleteAuthMethod($method); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testAuthMethods() + public function testAuthMethods() { $method = new AuthMethods(); $this->consul->acl()->authMethods($method); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testBindingRule() + public function testBindingRule() { $bindingRule = new BindingRule([ "description" => "example rule", @@ -379,19 +377,19 @@ function testBindingRule() "BindName" => "{{ serviceaccount.name }}" ]); $this->consul->acl()->bindingRule($bindingRule); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReadBindingRule() + public function testReadBindingRule() { $bindingRule = new BindingRule([ 'id' => '000ed53c-e2d3-e7e6-31a5-c19bc3518a3d', ]); $this->consul->acl()->readBindingRule($bindingRule); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdateBindingRule() + public function testUpdateBindingRule() { $bindingRule = new BindingRule([ 'id' => '000ed53c-e2d3-e7e6-31a5-c19bc3518a3d', @@ -402,22 +400,22 @@ function testUpdateBindingRule() "BindName" => "{{ serviceaccount.name }}", ]); $this->consul->acl()->updateBindingRule($bindingRule); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeleteBindingRule() + public function testDeleteBindingRule() { $bindingRule = new BindingRule([ 'id' => '000ed53c-e2d3-e7e6-31a5-c19bc3518a3d', ]); $this->consul->acl()->deleteBindingRule($bindingRule); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testBindingRules() + public function testBindingRules() { $bindingRules = new BindingRules(); $this->consul->acl()->bindingRules($bindingRules); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } -} \ No newline at end of file +} diff --git a/tests/AgentTest.php b/tests/AgentTest.php index ba65a96..18966df 100644 --- a/tests/AgentTest.php +++ b/tests/AgentTest.php @@ -19,7 +19,6 @@ use EasySwoole\Consul\Request\Agent\Connect\Authorize; use EasySwoole\Consul\Request\Agent\Connect\Ca\Leaf; use EasySwoole\Consul\Request\Agent\Connect\Ca\Roots; -use EasySwoole\Consul\Request\Agent\Connect\Proxy; use EasySwoole\Consul\Request\Agent\ForceLeave; use EasySwoole\Consul\Request\Agent\Health\Service\ID; use EasySwoole\Consul\Request\Agent\Health\Service\Name; @@ -41,111 +40,110 @@ class AgentTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); - } - function testMembers() + public function testMembers() { $this->consul->agent()->members(new Members([ 'wan' => 'a', 'segment' => '', ])); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testSelf() + public function testSelf() { $self = new SelfParams(); $this->consul->agent()->self($self); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReload() + public function testReload() { $reload = new Reload(); $this->consul->agent()->reload($reload); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testMaintenance() + public function testMaintenance() { $maintenance = new Maintenance([ 'enable' => true, 'reason' => '', ]); $this->consul->agent()->maintenance($maintenance); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testMetrics() + public function testMetrics() { $metrics = new Metrics([ 'format' => 'prometheus', ]); $this->consul->agent()->metrics($metrics); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testMonitor() + public function testMonitor() { $monitor = new Monitor([ 'loglevel' => 'info', ]); $this->consul->agent()->monitor($monitor); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testJoin() + public function testJoin() { $join = new Join([ 'address' => '1.2.3.4', 'wan' => false ]); $this->consul->agent()->join($join); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testLeave() + public function testLeave() { $leave = new Leave(); $this->consul->agent()->leave($leave); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testForceLeave() + public function testForceLeave() { $forceLeave = new ForceLeave([ 'node' => 'aaaaaaaaa' ]); $this->consul->agent()->forceLeave($forceLeave); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testToken() + public function testToken() { $token = new Token([ 'action' => 'acl_agent_token', 'token' => 'token' ]); $this->consul->agent()->token($token); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testChecks() + public function testChecks() { $checks = new Checks([ 'filter' => 'aaaa', ]); $this->consul->agent()->checks($checks); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testRegister() + public function testRegister() { $register = new Register([ 'name' => 'Memory', @@ -163,49 +161,49 @@ function testRegister() "TLSSkipVerify" => true, ]); $this->consul->agent()->register($register); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeRegister() + public function testDeRegister() { $deRegister = new DeRegister([ 'check_id' => 'Memory' ]); $this->consul->agent()->deRegister($deRegister); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testPass() + public function testPass() { $pass = new Pass([ 'check_id' => 'Memory', 'note' => 'aaaaa', ]); $this->consul->agent()->pass($pass); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testWarn() + public function testWarn() { $warn = new Warn([ 'check_id' => 'Memory', 'note' => 'aaaaa', ]); $this->consul->agent()->warn($warn); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testFail() + public function testFail() { $fail = new Fail([ 'check_id' => 'Memory', 'note' => 'aaaaa', ]); $this->consul->agent()->fail($fail); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdate() + public function testUpdate() { $update = new Update([ 'check_id' => 'Memory2', @@ -213,48 +211,48 @@ function testUpdate() 'Output' => 'update success' ]); $this->consul->agent()->update($update); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testServices() + public function testServices() { $services = new Services([ 'filter' => 'a', ]); $this->consul->agent()->services($services); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testService() + public function testService() { $service = new Service([ 'service_id' => "consul" ]); $this->consul->agent()->service($service); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testName() + public function testName() { $name = new Name([ 'service_name' => 'redis', 'format' => 'text', ]); $this->consul->agent()->name($name); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testId() + public function testId() { $id = new ID([ 'service_id' => 'consul', 'format' => 'text', ]); $this->consul->agent()->id($id); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testServiceRegister() + public function testServiceRegister() { $register = new Service\Register([ "ID" => "redis1", @@ -282,29 +280,30 @@ function testServiceRegister() ] ]); $this->consul->agent()->serviceRegister($register); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testServiceDeRegister() + public function testServiceDeRegister() { $deregister = new Service\DeRegister([ 'service_id' => 'redis1', ]); $this->consul->agent()->serviceDeregister($deregister); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testServiceMaintenance() - { + public function testServiceMaintenance() + { $maintenance= new Service\Maintenance([ 'service_id' => 'redis1', 'enable' => false, 'reason' => 'bbbb' ]); $this->consul->agent()->serviceMaintenance($maintenance); - $this->assertEquals('x','x'); - } - function testAuthorize() + $this->assertEquals('x', 'x'); + } + + public function testAuthorize() { $authorize = new Authorize([ "target" => "db", @@ -312,23 +311,22 @@ function testAuthorize() "clientCertSerial" => "04:00:00:00:00:01:15:4b:5a:c3:94" ]); $this->consul->agent()->authorize($authorize); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testRoots() + public function testRoots() { $roots = new Roots(); $this->consul->agent()->roots($roots); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testLeaf() + public function testLeaf() { $leaf = new Leaf([ 'service' => 'consul' ]); $this->consul->agent()->leaf($leaf); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - -} \ No newline at end of file +} diff --git a/tests/CatalogTest.php b/tests/CatalogTest.php index 7b061c2..9f1049c 100644 --- a/tests/CatalogTest.php +++ b/tests/CatalogTest.php @@ -24,7 +24,7 @@ class CatalogTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->config->setIP('127.0.0.1'); @@ -32,10 +32,9 @@ function __construct($name = null, array $data = [], $dataName = '') $this->config->setVersion('v1'); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); - } - function testRegister() + public function testRegister() { $register = new Register([ "datacenter" => "dc1", @@ -56,21 +55,21 @@ function testRegister() "primary", "v1" ], - "Address" => "127.0.0.1", - "TaggedAddresses" => [ - "lan" => [ + "Address" => "127.0.0.1", + "TaggedAddresses" => [ + "lan" => [ "address" => "127.0.0.1", - "port" => 8000, - ], - "wan" => [ - "address" => "198.18.0.1", + "port" => 8000, + ], + "wan" => [ + "address" => "198.18.0.1", "port" => 80 - ] - ], - "Meta" => [ + ] + ], + "Meta" => [ "redis_version" => "4.0" - ], - "Port" => 8000 + ], + "Port" => 8000 ], "Check" => [ "Node" => "foobar", @@ -89,28 +88,28 @@ function testRegister() "SkipNodeUpdate" => false ]); $this->consul->catalog()->register($register); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeregister() + public function testDeRegister() { - $deregister = new Deregister([ + $deregister = new DeRegister([ "datacenter" => "dc1", "node" => "foobar", "CheckID" => "service:redis1", ]); $this->consul->catalog()->deRegister($deregister); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDatacenters() + public function testDatacenters() { - $datacenters = new Datacenters(); + $datacenters = new DataCenters(); $this->consul->catalog()->dataCenters($datacenters); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testNodes() + public function testNodes() { $nodes = new Nodes([ 'dc' => 'dc1', @@ -119,20 +118,20 @@ function testNodes() 'filter' => '', ]); $this->consul->catalog()->nodes($nodes); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testServices() + public function testServices() { $services = new Services([ 'dc' => 'dc1', 'node-meta' => '', ]); $this->consul->catalog()->services($services); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testService() + public function testService() { $service = new Service([ 'service' => 'consul', @@ -143,10 +142,10 @@ function testService() 'filter' => '', ]); $this->consul->catalog()->service($service); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testConnect() + public function testConnect() { $connect = new Connect([ 'service' => 'consul', @@ -157,10 +156,10 @@ function testConnect() 'filter' => '', ]); $this->consul->catalog()->connect($connect); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testNode() + public function testNode() { $node = new Node([ 'node' => '2eb87046a6fe', @@ -168,6 +167,6 @@ function testNode() 'filter' => '', ]); $this->consul->catalog()->node($node); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } -} \ No newline at end of file +} diff --git a/tests/ConnectTest.php b/tests/ConnectTest.php index 4333008..6962973 100644 --- a/tests/ConnectTest.php +++ b/tests/ConnectTest.php @@ -19,28 +19,28 @@ class ConnectTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testRoots() + public function testRoots() { $roots = new Roots(); $this->consul->connect()->roots($roots); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testConfiguration() + public function testConfiguration() { $configuration = new Configuration(); $this->consul->connect()->configuration($configuration); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdateConfiguration() + public function testUpdateConfiguration() { $configuration = new Configuration([ 'Provider' => 'consul', @@ -49,10 +49,10 @@ function testUpdateConfiguration() ] ]); $this->consul->connect()->updateConfiguration($configuration); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testIntentions() + public function testIntentions() { $intentions = new Intentions([ 'SourceName' => 'web', @@ -61,26 +61,26 @@ function testIntentions() 'action' => 'allow' ]); $this->consul->connect()->intentions($intentions); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReadIntentions() + public function testReadIntentions() { $intentions = new Intentions([ 'uuid' => 'e9ebc19f-d481-42b1-4871-4d298d3acd5c', ]); $this->consul->connect()->readIntention($intentions); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testListIntentions() + public function testListIntentions() { $intentions = new Intentions(); $this->consul->connect()->listIntention($intentions); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdateIntentions() + public function testUpdateIntentions() { $intentions = new Intentions([ 'uuid' => 'b40faaf3-34aa-349f-3cf2-f5d720240662', @@ -90,36 +90,36 @@ function testUpdateIntentions() 'Action' => 'allow' ]); $this->consul->connect()->updateIntention($intentions); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeleteIntentions() + public function testDeleteIntentions() { $intentions = new Intentions([ 'uuid' => 'b40faaf3-34aa-349f-3cf2-f5d720240662', ]); $this->consul->connect()->deleteIntention($intentions); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testCheck() + public function testCheck() { $intentions = new Intentions\Check([ 'source' => 'web', 'destination' => 'db', ]); $this->consul->connect()->check($intentions); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testMatch() + public function testMatch() { $intentions = new Intentions\Match([ 'by' => 'source', 'name' => 'web', ]); $this->consul->connect()->match($intentions); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } -} \ No newline at end of file +} diff --git a/tests/ConsulConfigTest.php b/tests/ConsulConfigTest.php index 54376c8..37c64ca 100644 --- a/tests/ConsulConfigTest.php +++ b/tests/ConsulConfigTest.php @@ -16,14 +16,14 @@ class ConsulConfigTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testConfig() + public function testConfig() { $config = new \EasySwoole\Consul\Request\Config([ 'Kind' => 'service-defaults', @@ -31,35 +31,35 @@ function testConfig() 'Protocol' => 'Http' ]); $this->consul->config()->config($config); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testGetConfig() + public function testGetConfig() { $config = new \EasySwoole\Consul\Request\Config([ 'Kind' => 'service-defaults', 'name' => 'web', ]); $this->consul->config()->getConfig($config); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testListConfig() + public function testListConfig() { $config = new \EasySwoole\Consul\Request\Config([ 'Kind' => 'service-defaults' ]); $this->consul->config()->listConfig($config); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeleteConfig() + public function testDeleteConfig() { $config = new \EasySwoole\Consul\Request\Config([ 'Kind' => 'service-defaults', 'name' => 'web', ]); $this->consul->config()->deleteConfig($config); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } -} \ No newline at end of file +} diff --git a/tests/CoordinateTest.php b/tests/CoordinateTest.php index 221004f..83e927d 100644 --- a/tests/CoordinateTest.php +++ b/tests/CoordinateTest.php @@ -20,37 +20,37 @@ class CoordinateTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testDatacenters() + public function testDatacenters() { - $datacenters = new Datacenters(); - $this->consul->coordinates()->datacenters($datacenters); - $this->assertEquals('x','x'); + $datacenters = new DataCenters(); + $this->consul->coordinates()->dataCenters($datacenters); + $this->assertEquals('x', 'x'); } - function testNodes() + public function testNodes() { $nodes = new Nodes([]); $this->consul->coordinates()->nodes($nodes); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testNode() + public function testNode() { $node = new Node([ 'node' => '2456c2850382', ]); $this->consul->coordinates()->node($node); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdate() + public function testUpdate() { $update = new Update([ 'dc' => 'dc1', @@ -64,7 +64,6 @@ function testUpdate() ] ]); $this->consul->coordinates()->update($update); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - -} \ No newline at end of file +} diff --git a/tests/EventTest.php b/tests/EventTest.php index b49b216..522af77 100644 --- a/tests/EventTest.php +++ b/tests/EventTest.php @@ -18,29 +18,29 @@ class EventTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testFire() + public function testFire() { $fire = new Fire([ 'name' => 'consul', 'dc' => 'dc1', ]); $this->consul->event()->fire($fire); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testListEvent() + public function testListEvent() { $listEvent = new ListEvent([ 'name' => 'consul', ]); $this->consul->event()->listEvent($listEvent); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } -} \ No newline at end of file +} diff --git a/tests/HealthTest.php b/tests/HealthTest.php index c236f55..20a9e40 100644 --- a/tests/HealthTest.php +++ b/tests/HealthTest.php @@ -21,57 +21,58 @@ class HealthTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testNode() + public function testNode() { $node = new Node([ 'node' => '2456c2850382', 'dc' => 'dc1', ]); $this->consul->health()->node($node); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testChecks() + public function testChecks() { $checks = new Checks([ 'service' => 'consul', 'node_meta' => 'node-meta', ]); $this->consul->health()->checks($checks); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testService() + public function testService() { $service = new Service([ 'service' => 'consul', 'dc' => 'dc1', ]); $this->consul->health()->service($service); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testConnect() + public function testConnect() { $connect = new Connect([ 'service' => 'consul' ]); $this->consul->health()->connect($connect); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testState() { + public function testState() + { $state = new State([ 'state' => 'passing' ]); $this->consul->health()->state($state); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } -} \ No newline at end of file +} diff --git a/tests/KvStoreTest.php b/tests/KvStoreTest.php index a5a3b5b..6181a0b 100644 --- a/tests/KvStoreTest.php +++ b/tests/KvStoreTest.php @@ -17,34 +17,34 @@ class KvStoreTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testKv() + public function testKv() { $kv = new Kv([ 'key' => 'my-key', 'dc' => 'dc1', ]); $this->consul->kvStore()->kv($kv); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testCreate() + public function testCreate() { $create = new kv([ 'key' => 'my-key', 'dc' => 'dc1', ]); $this->consul->kvStore()->create($create); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdate() + public function testUpdate() { $update = new kv([ 'key' => 'my-key', @@ -52,16 +52,16 @@ function testUpdate() 'flag' => 'dc1' ]); $this->consul->kvStore()->update($update); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDelete() + public function testDelete() { $delete = new Kv([ 'key' => 'my-key', 'recurse' => false, ]); $this->consul->kvStore()->delete($delete); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } -} \ No newline at end of file +} diff --git a/tests/OperatorTest.php b/tests/OperatorTest.php index 1e495b6..562029e 100644 --- a/tests/OperatorTest.php +++ b/tests/OperatorTest.php @@ -23,14 +23,14 @@ class OperatorTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testArea() + public function testArea() { $area = new Area([ 'PeerDatacenter' => 'dc1', @@ -38,20 +38,20 @@ function testArea() "UseTLS" => false ]); $this->consul->operator()->area($area); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testAreaList() + public function testAreaList() { $area = new Area([ 'dc' => 'dc1', 'uuid' => '10275a2e-aa8f-2cf3-0adf-ff03d8950902', ]); $this->consul->operator()->areaList($area); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdateArea() + public function testUpdateArea() { $area = new Area([ 'uuid' => '10275a2e-aa8f-2cf3-0adf-ff03d8950902', @@ -59,47 +59,47 @@ function testUpdateArea() 'dc' => 'dc1', ]); $this->consul->operator()->updateArea($area); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeleteArea() + public function testDeleteArea() { $area = new Area([ 'uuid' => '10275a2e-aa8f-2cf3-0adf-ff03d8950902', ]); $this->consul->operator()->deleteArea($area); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testJoin() + public function testJoin() { $area = new Area([ 'uuid' => '10275a2e-aa8f-2cf3-0adf-ff03d8950902', ]); $this->consul->operator()->joinArea($area); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testMembers() + public function testMembers() { $area = new Area([ 'uuid' => '10275a2e-aa8f-2cf3-0adf-ff03d8950902' ]); $this->consul->operator()->membersArea($area); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testGetConfiguration() + public function testGetConfiguration() { $configuration = new Configuration([ 'dc' => 'dc1', 'stale' => true, ]); $this->consul->operator()->getConfiguration($configuration); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdateConfiguration() + public function testUpdateConfiguration() { $configuration = new Configuration([ 'dc' => 'dc1', @@ -114,104 +114,104 @@ function testUpdateConfiguration() ]); $this->consul->operator()->updateConfiguration($configuration); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReadHealth() + public function testReadHealth() { $health = new Health([ 'dc' => 'dc1', ]); $this->consul->operator()->health($health); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testGetKeyring() + public function testGetKeyring() { $keyring = new Keyring(); $keyring->setRelayFactor(0); $keyring->setLocalOnly(false); $this->consul->operator()->getKeyring($keyring); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testAddKeyring() + public function testAddKeyring() { $keyring = new Keyring([ "Key" => "3lg9DxVfKNzI8O+IQ5Ek+Q==", 'relayFactor' => 1, ]); $this->consul->operator()->addKeyring($keyring); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testChangeKeyring() + public function testChangeKeyring() { $keyring = new Keyring([ "Key" => "3lg9DxVfKNzI8O+IQ5Ek+Q==", ]); $this->consul->operator()->changeKeyring($keyring); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeleteKeyring() + public function testDeleteKeyring() { $keyring = new Keyring([ "Key" => "3lg9DxVfKNzI8O+IQ5Ek+Q==", "relayFactor" => 1 ]); $this->consul->operator()->deleteKeyring($keyring); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testGetLicense() + public function testGetLicense() { $license = new License([ 'dc' => 'dc1', ]); $this->consul->operator()->getLicense($license); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdateLicense() + public function testUpdateLicense() { $license = new License([ 'dc' => 'dc1' ]); $this->consul->operator()->updateLicense($license); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testResetLicense() + public function testResetLicense() { $license = new License([ 'dc' => 'dc1' ]); $this->consul->operator()->resetLicense($license); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testGetRaftConfiguration() + public function testGetRaftConfiguration() { $raft = new \EasySwoole\Consul\Request\Operator\Raft\Configuration(); $this->consul->operator()->getRaftConfiguration($raft); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeletePeer() + public function testDeletePeer() { $peer = new Peer([ 'address' => '172.17.0.18:8301', 'dc' => 'dc1', ]); $this->consul->operator()->peer($peer); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testSegment() + public function testSegment() { $segment = new Segment(); $this->consul->operator()->segment($segment); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } -} \ No newline at end of file +} diff --git a/tests/QueryTest.php b/tests/QueryTest.php index e011f40..5f9ecd8 100644 --- a/tests/QueryTest.php +++ b/tests/QueryTest.php @@ -17,14 +17,14 @@ class QueryTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testQuery() + public function testQuery() { $query = new Query([ "name" => "my-query", @@ -47,54 +47,54 @@ function testQuery() ], ]); $this->consul->query()->query($query); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testReadQuery() + public function testReadQuery() { $query = new Query([ 'dc' => 'dc1' ]); $this->consul->query()->readQuery($query); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testUpdateQuery() + public function testUpdateQuery() { $query = new Query([ 'uuid' => '90dce5ca-5697-ae2f-09ae-51e9542ea58c', 'dc' => 'dc1', ]); $this->consul->query()->updateQuery($query); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDeleteQuery() + public function testDeleteQuery() { $query = new Query([ 'uuid' => '90dce5ca-5697-ae2f-09ae-51e9542ea58c' ]); $this->consul->query()->deleteQuery($query); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testExecuteQuery() + public function testExecuteQuery() { $execute = new Query\Execute([ 'uuid' => '90dce5ca-5697-ae2f-09ae-51e9542ea58c', 'dc' => 'dc1', ]); $this->consul->query()->execute($execute); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testExplainQuery() + public function testExplainQuery() { $execute = new Query\Explain([ 'uuid' => '90dce5ca-5697-ae2f-09ae-51e9542ea58c', 'dc' => 'dc1', ]); $this->consul->query()->explain($execute); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } -} \ No newline at end of file +} diff --git a/tests/SessionTest.php b/tests/SessionTest.php index 7392a3d..c402d9e 100644 --- a/tests/SessionTest.php +++ b/tests/SessionTest.php @@ -22,14 +22,14 @@ class SessionTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testCreate() + public function testCreate() { $create = new Create([ 'dc' => 'dc1', @@ -41,55 +41,55 @@ function testCreate() "TTL" => "30s", ]); $this->consul->session()->create($create); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testDelete() + public function testDelete() { $destroy = new Destroy([ 'uuid' => 'f32a15b3-1baa-c047-bde9-bec3015ea013', 'dc' => 'dc1', ]); $this->consul->session()->destroy($destroy); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testInfo() + public function testInfo() { $info = new Info([ 'uuid' => 'f32a15b3-1baa-c047-bde9-bec3015ea013', 'dc' => 'dc1', ]); $this->consul->session()->info($info); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testNode() + public function testNode() { $node = new Node([ 'node' => '2456c2850382', 'dc' => 'dc1', ]); $this->consul->session()->node($node); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testSessionList() + public function testSessionList() { $sessionList = new SessionList([ 'dc' => 'dc1' ]); $this->consul->session()->sessionList($sessionList); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testRenew() + public function testRenew() { $renew = new Renew([ 'uuid' => '4f6d1cf6-b60a-c929-eeb8-12f4d7eaff62', 'dc' => 'dc1' ]); $this->consul->session()->renew($renew); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } -} \ No newline at end of file +} diff --git a/tests/SnapshotTest.php b/tests/SnapshotTest.php index 3999df5..a5acd11 100644 --- a/tests/SnapshotTest.php +++ b/tests/SnapshotTest.php @@ -17,28 +17,27 @@ class SnapshotTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testGenerate() + public function testGenerate() { $generate = new Snapshot([ 'dc' => 'dc1', 'stale' => 'true', ]); $this->consul->snapshot()->generate($generate); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testRestore() + public function testRestore() { $restore = new Snapshot(); $this->consul->snapshot()->restore($restore); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - -} \ No newline at end of file +} diff --git a/tests/StatusTest.php b/tests/StatusTest.php index 83d218f..efd28de 100644 --- a/tests/StatusTest.php +++ b/tests/StatusTest.php @@ -18,27 +18,26 @@ class StatusTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testLeader() + public function testLeader() { $leader = new Leader(); var_dump($this->consul->status()->leader($leader)); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - function testPeers() + public function testPeers() { $peers = new Peers([ 'dc' => 'dc1', ]); var_dump($this->consul->status()->peers($peers)); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - -} \ No newline at end of file +} diff --git a/tests/TxnTest.php b/tests/TxnTest.php index 81a334d..f72c2e0 100644 --- a/tests/TxnTest.php +++ b/tests/TxnTest.php @@ -17,18 +17,17 @@ class TxnTest extends TestCase protected $config; protected $consul; - function __construct($name = null, array $data = [], $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { $this->config = new Config(); $this->consul = new Consul($this->config); parent::__construct($name, $data, $dataName); } - function testCreate() + public function testCreate() { $transaction = new Txn([]); $this->consul->transaction()->create($transaction); - $this->assertEquals('x','x'); + $this->assertEquals('x', 'x'); } - -} \ No newline at end of file +}