Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Apr 10, 2020
1 parent de99022 commit 1da68a8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Agent.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use EasySwoole\Consul\ConsulInterface\AgentInterface;
use EasySwoole\Consul\Exception\MissingRequiredParamsException;
use EasySwoole\Consul\Exception\InvalidRequiredParamsException;
use EasySwoole\Consul\Request\Agent\Check\Deregister;
use EasySwoole\Consul\Request\Agent\Check\DeRegister;
use EasySwoole\Consul\Request\Agent\Check\Fail;
use EasySwoole\Consul\Request\Agent\Check\Pass;
use EasySwoole\Consul\Request\Agent\Check\Register;
Expand Down
6 changes: 3 additions & 3 deletions src/Catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -35,12 +35,12 @@ public function register(Register $register)

/**
* Deregister Entity
* @param Deregister $deregister
* @param DeRegister $deregister
* @return mixed
* @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.');
Expand Down
4 changes: 2 additions & 2 deletions src/ConsulInterface/CatalogInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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;
Expand All @@ -20,7 +20,7 @@ interface CatalogInterface
{
public function register(Register $register);

public function deRegister(Deregister $deregister);
public function deRegister(DeRegister $deregister);

public function dataCenters(Datacenters $datacenters);

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use EasySwoole\Consul\Request\BaseCommand;

class Deregister extends BaseCommand
class DeRegister extends BaseCommand
{
public $url='catalog/deregister';

Expand Down
4 changes: 2 additions & 2 deletions tests/CatalogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use EasySwoole\Consul\Consul;
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;
Expand Down Expand Up @@ -94,7 +94,7 @@ function testRegister()

function testDeregister()
{
$deregister = new Deregister([
$deregister = new DeRegister([
"datacenter" => "dc1",
"node" => "foobar",
"CheckID" => "service:redis1",
Expand Down

0 comments on commit 1da68a8

Please sign in to comment.