Skip to content

Commit

Permalink
Change method name
Browse files Browse the repository at this point in the history
For consistency
  • Loading branch information
jpcaparas committed Apr 12, 2019
1 parent 80983bc commit fb1f652
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Client.php
Expand Up @@ -51,7 +51,7 @@ public function sellItem(array $params): string

self::validateParams($requiredKeys, $params);

return $this->send('POST', $uri, $params);
return $this->api('POST', $uri, $params);
}

/**
Expand Down Expand Up @@ -79,7 +79,7 @@ private static function validateParams(array $requiredKeys, array $params): void
}

/**
* General purpose method for sending requests
* General purpose method for sending API requests.
*
* @param $method
* @param $uri
Expand All @@ -89,7 +89,7 @@ private static function validateParams(array $requiredKeys, array $params): void
*
* @throws RequestException
*/
public function send($method, $uri, $params): string
public function api($method, $uri, $params): string
{
return $this->request->api($method, $uri, $params);
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/ClientTest.php
Expand Up @@ -79,9 +79,9 @@ public function testSellItem(): void
}

/**
* @covers ::send
* @covers ::api
*/
public function testSend(): void
public function testApi(): void
{
$request = $this->prophesize(Request::class);
$request->api(
Expand Down Expand Up @@ -116,6 +116,6 @@ public function testSend(): void
],
];

$client->send('GET', 'SomeURI.json', $params);
$client->api('GET', 'SomeURI.json', $params);
}
}

0 comments on commit fb1f652

Please sign in to comment.