From 6634c95447f95378681c0407530359a1b0ee3e19 Mon Sep 17 00:00:00 2001 From: darthmaim Date: Sun, 28 Jun 2015 00:40:55 +0200 Subject: [PATCH] rename AccountEndpoint::info() to get() all other endpoints use `get` as method name --- src/V2/Endpoint/Account/AccountEndpoint.php | 10 ++++++++++ tests/V2/AccountEndpointTest.php | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/V2/Endpoint/Account/AccountEndpoint.php b/src/V2/Endpoint/Account/AccountEndpoint.php index 576d51a..539d743 100644 --- a/src/V2/Endpoint/Account/AccountEndpoint.php +++ b/src/V2/Endpoint/Account/AccountEndpoint.php @@ -27,9 +27,19 @@ protected function url() { /** * Get your basic account info. * + * @deprecated since 1.5.0 * @return mixed */ public function info() { + return $this->get(); + } + + /** + * Get your basic account info. + * + * @return mixed + */ + public function get() { return $this->request()->json(); } diff --git a/tests/V2/AccountEndpointTest.php b/tests/V2/AccountEndpointTest.php index 16f67d6..52e1121 100644 --- a/tests/V2/AccountEndpointTest.php +++ b/tests/V2/AccountEndpointTest.php @@ -13,7 +13,7 @@ public function test() { ] }'); - $account = $this->api()->account('api_key')->info(); + $account = $this->api()->account('api_key')->get(); $this->assertEquals( 'Lawton.1234', $account->name ); } }