diff options
author | Mattijs van Druenen <mattijsvandruenen@voormedia.com> | 2018-11-07 12:13:32 +0100 |
---|---|---|
committer | Mattijs van Druenen <mattijsvandruenen@voormedia.com> | 2018-11-07 12:13:32 +0100 |
commit | cb76e97b93ef7646c9a24a461687defe1a4d212e (patch) | |
tree | eece8b498c070302d67a501422ae7caacf51571b | |
parent | b21ccb567f3923b80660658416ee134dbe0ae0d4 (diff) | |
download | tinify-php-origin/create-key.zip tinify-php-origin/create-key.tar.gz tinify-php-origin/create-key.tar.bz2 |
Lets indeed not introduce extra alias getters for the new information returned from the /keys endpoint.origin/create-key
-rw-r--r-- | lib/Tinify.php | 12 | ||||
-rw-r--r-- | test/TinifyClientTest.php | 6 |
2 files changed, 3 insertions, 15 deletions
diff --git a/lib/Tinify.php b/lib/Tinify.php index 07d158a..32d10f1 100644 --- a/lib/Tinify.php +++ b/lib/Tinify.php @@ -121,26 +121,14 @@ function compressionCount() { return Tinify::getCompressionCount(); } -function getRemainingCredits() { - return Tinify::getRemainingCredits(); -} - function remainingCredits() { return Tinify::getRemainingCredits(); } -function getPayingState() { - return Tinify::getPayingState(); -} - function payingState() { return Tinify::getPayingState(); } -function getEmailAddress() { - return Tinify::getEmailAddress(); -} - function emailAddress() { return Tinify::getEmailAddress(); } diff --git a/test/TinifyClientTest.php b/test/TinifyClientTest.php index 1df1131..1ad0c92 100644 --- a/test/TinifyClientTest.php +++ b/test/TinifyClientTest.php @@ -62,7 +62,7 @@ class TinifyClientTest extends TestCase { $client = new Tinify\Client("key"); $client->request("get", "/"); - $this->assertSame(488, Tinify\getRemainingCredits()); + $this->assertSame(488, Tinify\remainingCredits()); } public function testRequestWhenValidShouldUpdatePayingState() { @@ -72,7 +72,7 @@ class TinifyClientTest extends TestCase { $client = new Tinify\Client("key"); $client->request("get", "/"); - $this->assertSame("free", Tinify\getPayingState()); + $this->assertSame("free", Tinify\payingState()); } public function testRequestWhenValidShouldUpdateEmailAddress() { @@ -82,7 +82,7 @@ class TinifyClientTest extends TestCase { $client = new Tinify\Client("key"); $client->request("get", "/"); - $this->assertSame("test@example.com", Tinify\getEmailAddress()); + $this->assertSame("test@example.com", Tinify\emailAddress()); } public function testRequestWhenValidWithAppIdShouldIssueRequestWithUserAgent() { |