diff --git a/examples/authorization.php b/examples/authorization.php index 0266ec7..e8770f8 100644 --- a/examples/authorization.php +++ b/examples/authorization.php @@ -23,4 +23,4 @@ echo $token->errorDescription(); } else { echo "Refresh Token: " . $token->refreshToken(); -} \ No newline at end of file +} diff --git a/examples/purchase.php b/examples/purchase.php index bb11e54..d5daf64 100644 --- a/examples/purchase.php +++ b/examples/purchase.php @@ -26,4 +26,4 @@ echo "Consumed: " . $purchase->consumed(); echo "Developer Payload: " . $purchase->developerPayload(); echo "Purchase Time (Timestamp in ms): " . $purchase->time(); -} \ No newline at end of file +} diff --git a/examples/subscription.php b/examples/subscription.php index 852204e..023d3d4 100644 --- a/examples/subscription.php +++ b/examples/subscription.php @@ -26,4 +26,4 @@ echo "End Time (Timestamp in ms): " . $subscription->endTime(); // expirationTime(), nextTime() echo "Is auto renewing? " . $subscription->autoRenewing(); echo "Is expired? (end time is past) " . $subscription->expired(); -} \ No newline at end of file +} diff --git a/examples/unsubscribe.php b/examples/unsubscribe.php index 3fc4711..5b04d5e 100644 --- a/examples/unsubscribe.php +++ b/examples/unsubscribe.php @@ -23,4 +23,4 @@ echo "The subscription has been successfully cancelled!"; } else { echo $unsubscribe->errorDescription(); -} \ No newline at end of file +} diff --git a/src/Bazaar.php b/src/Bazaar.php index 8463478..209170b 100644 --- a/src/Bazaar.php +++ b/src/Bazaar.php @@ -92,7 +92,6 @@ public function token($redirectUrl, array $input = []) ]); return new Token($response); - } /** @@ -286,5 +285,4 @@ protected function fetchToken() return $token->accessToken(); } - -} \ No newline at end of file +} diff --git a/src/BazaarException.php b/src/BazaarException.php index 38ddc63..535f745 100644 --- a/src/BazaarException.php +++ b/src/BazaarException.php @@ -3,5 +3,4 @@ class BazaarException extends \Exception { - -} \ No newline at end of file +} diff --git a/src/Client/ClientInterface.php b/src/Client/ClientInterface.php index 825a8ea..133afb7 100644 --- a/src/Client/ClientInterface.php +++ b/src/Client/ClientInterface.php @@ -23,4 +23,4 @@ public function get($url, array $options = []); * @return array */ public function post($url, array $options = []); -} \ No newline at end of file +} diff --git a/src/Client/GuzzleClient.php b/src/Client/GuzzleClient.php index 471f4a4..f06b581 100644 --- a/src/Client/GuzzleClient.php +++ b/src/Client/GuzzleClient.php @@ -29,7 +29,6 @@ public function get($url, array $options = []) { try { $response = $this->client->get($url, $options); - } catch (RequestException $e) { if (!$e->hasResponse()) { throw $e; @@ -49,7 +48,6 @@ public function post($url, array $options = []) { try { $response = $this->client->post($url, $options); - } catch (RequestException $e) { if (!$e->hasResponse()) { throw $e; @@ -61,4 +59,4 @@ public function post($url, array $options = []) $response->getBody()->getContents(), true ); } -} \ No newline at end of file +} diff --git a/src/Config.php b/src/Config.php index 4cc37fb..db64882 100644 --- a/src/Config.php +++ b/src/Config.php @@ -93,5 +93,4 @@ public function refreshToken() { return $this->options['refresh-token']; } - -} \ No newline at end of file +} diff --git a/src/Models/Model.php b/src/Models/Model.php index d0d88ad..c1724cd 100644 --- a/src/Models/Model.php +++ b/src/Models/Model.php @@ -103,4 +103,4 @@ public function errorDescription() { return $this->errorDescription; } -} \ No newline at end of file +} diff --git a/src/Models/Purchase.php b/src/Models/Purchase.php index fb9e533..d0be8a9 100644 --- a/src/Models/Purchase.php +++ b/src/Models/Purchase.php @@ -141,6 +141,4 @@ public function notFound() { return $this->failed() && $this->error == 'not_found'; } - - -} \ No newline at end of file +} diff --git a/src/Models/Subscription.php b/src/Models/Subscription.php index 1828810..31a6111 100644 --- a/src/Models/Subscription.php +++ b/src/Models/Subscription.php @@ -150,5 +150,4 @@ public function notFound() { return $this->failed() && $this->error == 'not_found'; } - -} \ No newline at end of file +} diff --git a/src/Models/Token.php b/src/Models/Token.php index 0fb22d3..4ae39f2 100644 --- a/src/Models/Token.php +++ b/src/Models/Token.php @@ -108,5 +108,4 @@ public function scope() { return $this->scope; } - -} \ No newline at end of file +} diff --git a/src/Models/Unsubscribe.php b/src/Models/Unsubscribe.php index 48b95b4..b82d2c1 100644 --- a/src/Models/Unsubscribe.php +++ b/src/Models/Unsubscribe.php @@ -50,4 +50,4 @@ public function notFound() { return $this->failed() && $this->error == 'not_found'; } -} \ No newline at end of file +} diff --git a/src/Storage/FileTokenStorage.php b/src/Storage/FileTokenStorage.php index 7a81c37..e4d4ff2 100644 --- a/src/Storage/FileTokenStorage.php +++ b/src/Storage/FileTokenStorage.php @@ -48,7 +48,6 @@ public function retrieve() } return null; - } /** @@ -82,4 +81,4 @@ protected function read() return $data; } -} \ No newline at end of file +} diff --git a/src/Storage/MemoryTokenStorage.php b/src/Storage/MemoryTokenStorage.php index e5181ae..46fc018 100644 --- a/src/Storage/MemoryTokenStorage.php +++ b/src/Storage/MemoryTokenStorage.php @@ -9,7 +9,7 @@ class MemoryTokenStorage implements TokenStorageInterface /** * token object * - * Token + * @var Token */ protected $token; @@ -48,4 +48,4 @@ public function expired() { return time() > $this->expireTime; } -} \ No newline at end of file +} diff --git a/src/Storage/TokenStorageInterface.php b/src/Storage/TokenStorageInterface.php index 3819637..cc722b9 100644 --- a/src/Storage/TokenStorageInterface.php +++ b/src/Storage/TokenStorageInterface.php @@ -25,4 +25,4 @@ public function retrieve(); * @return bool */ public function expired(); -} \ No newline at end of file +} diff --git a/tests/AccessTokenTest.php b/tests/AccessTokenTest.php index a160164..406a747 100644 --- a/tests/AccessTokenTest.php +++ b/tests/AccessTokenTest.php @@ -9,8 +9,6 @@ class AccessTokenTest extends TestCase /** @test */ public function it_should_fetch_access_token() { - $bazaar = $this->makeBazaar(); - $redirectUrl = 'http://example.com/callback'; $bazaar = $this->makeBazaar(); @@ -45,4 +43,4 @@ public function it_should_fetch_access_token() $this->assertEquals('refresh-123456', $token->refreshToken()); $this->assertEquals('androidpublisher', $token->scope()); } -} \ No newline at end of file +} diff --git a/tests/FileTokenStorageTest.php b/tests/FileTokenStorageTest.php index 59e216e..b6740ba 100644 --- a/tests/FileTokenStorageTest.php +++ b/tests/FileTokenStorageTest.php @@ -37,4 +37,4 @@ public function it_should_say_token_has_been_expired_when_token_does_not_exist() $this->assertTrue($storage->expired()); $this->assertNull($storage->retrieve()); } -} \ No newline at end of file +} diff --git a/tests/GuzzleClientTest.php b/tests/GuzzleClientTest.php index bf6484d..39a6c7f 100644 --- a/tests/GuzzleClientTest.php +++ b/tests/GuzzleClientTest.php @@ -33,7 +33,6 @@ public function it_should_send_a_get_request() 'key-one' => 'something', 'key-two' => 'something-else' ], $response); - } /** @test */ @@ -84,7 +83,5 @@ public function it_should_send_a_post_request() 'key-one' => 'something', 'key-two' => 'something-else' ], $response); - } - -} \ No newline at end of file +} diff --git a/tests/MemoryTokenStorageTest.php b/tests/MemoryTokenStorageTest.php index 3c23009..44cf4f2 100644 --- a/tests/MemoryTokenStorageTest.php +++ b/tests/MemoryTokenStorageTest.php @@ -28,10 +28,9 @@ public function it_should_save_the_token() /** @test */ public function it_should_say_token_has_been_expired_when_token_does_not_exist() { - $storage = new MemoryTokenStorage(); $this->assertTrue($storage->expired()); $this->assertNull($storage->retrieve()); } -} \ No newline at end of file +} diff --git a/tests/PurchaseTest.php b/tests/PurchaseTest.php index 092dc67..b7894e1 100644 --- a/tests/PurchaseTest.php +++ b/tests/PurchaseTest.php @@ -36,7 +36,6 @@ public function it_should_fetch_purchase_state() $this->assertTrue($purchase->purchased()); $this->assertFalse($purchase->consumed()); $this->assertEquals('payload-123456', $purchase->payload()); - } /** @test */ @@ -78,6 +77,4 @@ public function purchase_should_parse_not_found_response() $this->assertEquals('not_found', $purchase->error()); $this->assertEquals('The requested purchase is not found!', $purchase->errorDescription()); } - - -} \ No newline at end of file +} diff --git a/tests/RefreshTokenTest.php b/tests/RefreshTokenTest.php index c60f5ac..0303846 100644 --- a/tests/RefreshTokenTest.php +++ b/tests/RefreshTokenTest.php @@ -79,6 +79,5 @@ public function it_should_refresh_the_token_and_store_it() $this->assertFalse($token->failed()); $this->assertEquals('123456', $token->accessToken()); - } -} \ No newline at end of file +} diff --git a/tests/SubscriptionTest.php b/tests/SubscriptionTest.php index 37efe91..4d79f3e 100644 --- a/tests/SubscriptionTest.php +++ b/tests/SubscriptionTest.php @@ -36,7 +36,6 @@ public function it_should_fetch_subscription_state() $this->assertEquals(1100000000000, $subscription->endTime()); $this->assertTrue($subscription->autoRenewing()); $this->assertTrue($subscription->expired()); - } /** @test */ @@ -80,5 +79,4 @@ public function it_should_parse_not_found_response() $this->assertEquals('not_found', $subscription->error()); $this->assertEquals('The requested purchase is not found!', $subscription->errorDescription()); } - -} \ No newline at end of file +} diff --git a/tests/TestCase.php b/tests/TestCase.php index bb9ed5e..e3f200a 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -85,4 +85,4 @@ protected function makeTokenUrl() { return (new Config())->url('token'); } -} \ No newline at end of file +} diff --git a/tests/UnsubscribeTest.php b/tests/UnsubscribeTest.php index 7ef6f6c..605eb2d 100644 --- a/tests/UnsubscribeTest.php +++ b/tests/UnsubscribeTest.php @@ -49,5 +49,4 @@ public function it_should_parse_not_found_response() $this->assertEquals('not_found', $unsubscribe->error()); $this->assertEquals('The requested purchase is not found!', $unsubscribe->errorDescription()); } - -} \ No newline at end of file +}