From 4712ae70948bee2f36e369b929d9c1f94cffbda7 Mon Sep 17 00:00:00 2001 From: Daan Geurts Date: Wed, 16 Oct 2019 12:56:53 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/model/AppleNotification.php | 3 +-- src/model/Receipt.php | 4 ---- src/model/RenewalInfo.php | 4 ++-- tests/IntegrationTest.php | 1 - tests/TestCase.php | 5 ++--- tests/__fixtures__/request.php | 2 +- 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/model/AppleNotification.php b/src/model/AppleNotification.php index ea76a2d..a57cd3e 100644 --- a/src/model/AppleNotification.php +++ b/src/model/AppleNotification.php @@ -8,12 +8,11 @@ class AppleNotification extends Model { public $guarded = []; - public static function storeNotification(String $notificationType, NotificationPayload $notificationPayload) + public static function storeNotification(string $notificationType, NotificationPayload $notificationPayload) { return self::create([ 'type' => $notificationType, 'payload' => serialize($notificationPayload), ]); } - } diff --git a/src/model/Receipt.php b/src/model/Receipt.php index 715b299..bc94191 100644 --- a/src/model/Receipt.php +++ b/src/model/Receipt.php @@ -2,8 +2,6 @@ namespace Appvise\AppStoreNotifications\Model; - - class Receipt { private $originalTransactionId; @@ -37,7 +35,6 @@ class Receipt public function __construct() { - } public static function createFromArray(array $receiptInfo) @@ -75,7 +72,6 @@ class Receipt return $instance; } - /** * Get the value of bid. */ diff --git a/src/model/RenewalInfo.php b/src/model/RenewalInfo.php index 2399f7b..2548f6f 100644 --- a/src/model/RenewalInfo.php +++ b/src/model/RenewalInfo.php @@ -2,7 +2,6 @@ namespace Appvise\AppStoreNotifications\Model; - class RenewalInfo { private $autoRenewProductId; @@ -16,7 +15,6 @@ class RenewalInfo private $gracePeriodExpiresDateMs; private $gracePeriodExpiresDatePst; - public function __construct() { } @@ -33,8 +31,10 @@ class RenewalInfo $instance->priceConsentStatus = $pendingRenewalInfo['price_consent_status'] ?? null; $instance->gracePeriodExpiresDate = $pendingRenewalInfo['grace_period_expires_date'] ?? null; $instance->gracePeriodExpiresDatePst = $pendingRenewalInfo['grace_period_expires_date_pst'] ?? null; + return $instance; } + /** * Get the value of autoRenewProductId. */ diff --git a/tests/IntegrationTest.php b/tests/IntegrationTest.php index c2a5e1f..10be14d 100644 --- a/tests/IntegrationTest.php +++ b/tests/IntegrationTest.php @@ -73,5 +73,4 @@ class IntegrationTest extends TestCase Queue::assertNotPushed(DummyJob::class); } - } diff --git a/tests/TestCase.php b/tests/TestCase.php index 66fe3fa..b3c27b6 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,12 +2,12 @@ namespace Appvise\AppStoreNotifications\Tests; -use Appvise\AppStoreNotifications\NotificationsServiceProvider; use Exception; +use CreateAppleNotificationsTable; use Illuminate\Foundation\Exceptions\Handler; use Illuminate\Contracts\Debug\ExceptionHandler; use Orchestra\Testbench\TestCase as OrchestraTestCase; -use CreateAppleNotificationsTable; +use Appvise\AppStoreNotifications\NotificationsServiceProvider; abstract class TestCase extends OrchestraTestCase { @@ -71,5 +71,4 @@ abstract class TestCase extends OrchestraTestCase } }); } - } diff --git a/tests/__fixtures__/request.php b/tests/__fixtures__/request.php index bc45863..9538ca9 100644 --- a/tests/__fixtures__/request.php +++ b/tests/__fixtures__/request.php @@ -1,4 +1,5 @@