Browse Source

Apply fixes from StyleCI

proxy_request
Daan Geurts 5 years ago
committed by StyleCI Bot
parent
commit
4712ae7094
  1. 3
      src/model/AppleNotification.php
  2. 4
      src/model/Receipt.php
  3. 4
      src/model/RenewalInfo.php
  4. 1
      tests/IntegrationTest.php
  5. 5
      tests/TestCase.php
  6. 2
      tests/__fixtures__/request.php

3
src/model/AppleNotification.php

@ -8,12 +8,11 @@ class AppleNotification extends Model
{ {
public $guarded = []; public $guarded = [];
public static function storeNotification(String $notificationType, NotificationPayload $notificationPayload) public static function storeNotification(string $notificationType, NotificationPayload $notificationPayload)
{ {
return self::create([ return self::create([
'type' => $notificationType, 'type' => $notificationType,
'payload' => serialize($notificationPayload), 'payload' => serialize($notificationPayload),
]); ]);
} }
} }

4
src/model/Receipt.php

@ -2,8 +2,6 @@
namespace Appvise\AppStoreNotifications\Model; namespace Appvise\AppStoreNotifications\Model;
class Receipt class Receipt
{ {
private $originalTransactionId; private $originalTransactionId;
@ -37,7 +35,6 @@ class Receipt
public function __construct() public function __construct()
{ {
} }
public static function createFromArray(array $receiptInfo) public static function createFromArray(array $receiptInfo)
@ -75,7 +72,6 @@ class Receipt
return $instance; return $instance;
} }
/** /**
* Get the value of bid. * Get the value of bid.
*/ */

4
src/model/RenewalInfo.php

@ -2,7 +2,6 @@
namespace Appvise\AppStoreNotifications\Model; namespace Appvise\AppStoreNotifications\Model;
class RenewalInfo class RenewalInfo
{ {
private $autoRenewProductId; private $autoRenewProductId;
@ -16,7 +15,6 @@ class RenewalInfo
private $gracePeriodExpiresDateMs; private $gracePeriodExpiresDateMs;
private $gracePeriodExpiresDatePst; private $gracePeriodExpiresDatePst;
public function __construct() public function __construct()
{ {
} }
@ -33,8 +31,10 @@ class RenewalInfo
$instance->priceConsentStatus = $pendingRenewalInfo['price_consent_status'] ?? null; $instance->priceConsentStatus = $pendingRenewalInfo['price_consent_status'] ?? null;
$instance->gracePeriodExpiresDate = $pendingRenewalInfo['grace_period_expires_date'] ?? null; $instance->gracePeriodExpiresDate = $pendingRenewalInfo['grace_period_expires_date'] ?? null;
$instance->gracePeriodExpiresDatePst = $pendingRenewalInfo['grace_period_expires_date_pst'] ?? null; $instance->gracePeriodExpiresDatePst = $pendingRenewalInfo['grace_period_expires_date_pst'] ?? null;
return $instance; return $instance;
} }
/** /**
* Get the value of autoRenewProductId. * Get the value of autoRenewProductId.
*/ */

1
tests/IntegrationTest.php

@ -73,5 +73,4 @@ class IntegrationTest extends TestCase
Queue::assertNotPushed(DummyJob::class); Queue::assertNotPushed(DummyJob::class);
} }
} }

5
tests/TestCase.php

@ -2,12 +2,12 @@
namespace Appvise\AppStoreNotifications\Tests; namespace Appvise\AppStoreNotifications\Tests;
use Appvise\AppStoreNotifications\NotificationsServiceProvider;
use Exception; use Exception;
use CreateAppleNotificationsTable;
use Illuminate\Foundation\Exceptions\Handler; use Illuminate\Foundation\Exceptions\Handler;
use Illuminate\Contracts\Debug\ExceptionHandler; use Illuminate\Contracts\Debug\ExceptionHandler;
use Orchestra\Testbench\TestCase as OrchestraTestCase; use Orchestra\Testbench\TestCase as OrchestraTestCase;
use CreateAppleNotificationsTable; use Appvise\AppStoreNotifications\NotificationsServiceProvider;
abstract class TestCase extends OrchestraTestCase abstract class TestCase extends OrchestraTestCase
{ {
@ -71,5 +71,4 @@ abstract class TestCase extends OrchestraTestCase
} }
}); });
} }
} }

2
tests/__fixtures__/request.php

@ -1,4 +1,5 @@
<?php <?php
return json_decode('{ return json_decode('{
"environment": "Sandbox", "environment": "Sandbox",
"notification_type": "INITIAL_BUY", "notification_type": "INITIAL_BUY",
@ -62,7 +63,6 @@ return json_decode('{
}', true }', true
); );
//{ //{
// "environment": "Sandbox", // "environment": "Sandbox",
// "notification_type": "INITIAL_BUY", // "notification_type": "INITIAL_BUY",

Loading…
Cancel
Save