Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated native_function_invocation fixes #806

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions build.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#!/usr/bin/env php
<?php
chdir(dirname(__FILE__));
\chdir(\dirname(__FILE__));

$autoload = (int)$argv[1];
$returnStatus = null;

if (!$autoload) {
// Modify composer to not autoload Stripe
$composer = json_decode(file_get_contents('composer.json'), true);
$composer = \json_decode(\file_get_contents('composer.json'), true);
unset($composer['autoload']);
unset($composer['autoload-dev']);
file_put_contents('composer.json', json_encode($composer, JSON_PRETTY_PRINT));
\file_put_contents('composer.json', \json_encode($composer, JSON_PRETTY_PRINT));
}

passthru('composer update', $returnStatus);
\passthru('composer update', $returnStatus);
if ($returnStatus !== 0) {
exit(1);
}

$config = $autoload ? 'phpunit.xml' : 'phpunit.no_autoload.xml';
passthru("./vendor/bin/phpunit -c $config", $returnStatus);
\passthru("./vendor/bin/phpunit -c $config", $returnStatus);
if ($returnStatus !== 0) {
exit(1);
}
8 changes: 4 additions & 4 deletions examples/oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

require('../init.php');

\Stripe\Stripe::setApiKey(getenv('STRIPE_SECRET_KEY'));
\Stripe\Stripe::setClientId(getenv('STRIPE_CLIENT_ID'));
\Stripe\Stripe::setApiKey(\getenv('STRIPE_SECRET_KEY'));
\Stripe\Stripe::setClientId(\getenv('STRIPE_CLIENT_ID'));


if (isset($_GET['code'])) {
Expand All @@ -28,7 +28,7 @@
$error = $_GET['error'];
$error_description = $_GET['error_description'];

echo "<p>Error: code=" . htmlspecialchars($error, ENT_QUOTES) . ", description=" . htmlspecialchars($error_description, ENT_QUOTES) . "</p>\n";
echo "<p>Error: code=" . \htmlspecialchars($error, ENT_QUOTES) . ", description=" . \htmlspecialchars($error_description, ENT_QUOTES) . "</p>\n";
echo "<p>Click <a href=\"?\">here</a> to restart the OAuth flow.</p>\n";
} elseif (isset($_GET['deauth'])) {
// Deauthorization request
Expand All @@ -42,7 +42,7 @@
exit("Error: " . $e->getMessage());
}

echo "<p>Success! Account <code>" . htmlspecialchars($accountId, ENT_QUOTES) . "</code> is disconnected.</p>\n";
echo "<p>Success! Account <code>" . \htmlspecialchars($accountId, ENT_QUOTES) . "</code> is disconnected.</p>\n";
echo "<p>Click <a href=\"?\">here</a> to restart the OAuth flow.</p>\n";
} else {
$url = \Stripe\OAuth::authorizeUrl([
Expand Down
258 changes: 129 additions & 129 deletions init.php
Original file line number Diff line number Diff line change
@@ -1,150 +1,150 @@
<?php

// Stripe singleton
require(dirname(__FILE__) . '/lib/Stripe.php');
require(\dirname(__FILE__) . '/lib/Stripe.php');

// Utilities
require(dirname(__FILE__) . '/lib/Util/CaseInsensitiveArray.php');
require(dirname(__FILE__) . '/lib/Util/LoggerInterface.php');
require(dirname(__FILE__) . '/lib/Util/DefaultLogger.php');
require(dirname(__FILE__) . '/lib/Util/RandomGenerator.php');
require(dirname(__FILE__) . '/lib/Util/RequestOptions.php');
require(dirname(__FILE__) . '/lib/Util/Set.php');
require(dirname(__FILE__) . '/lib/Util/Util.php');
require(\dirname(__FILE__) . '/lib/Util/CaseInsensitiveArray.php');
require(\dirname(__FILE__) . '/lib/Util/LoggerInterface.php');
require(\dirname(__FILE__) . '/lib/Util/DefaultLogger.php');
require(\dirname(__FILE__) . '/lib/Util/RandomGenerator.php');
require(\dirname(__FILE__) . '/lib/Util/RequestOptions.php');
require(\dirname(__FILE__) . '/lib/Util/Set.php');
require(\dirname(__FILE__) . '/lib/Util/Util.php');

// HttpClient
require(dirname(__FILE__) . '/lib/HttpClient/ClientInterface.php');
require(dirname(__FILE__) . '/lib/HttpClient/CurlClient.php');
require(\dirname(__FILE__) . '/lib/HttpClient/ClientInterface.php');
require(\dirname(__FILE__) . '/lib/HttpClient/CurlClient.php');

// Exceptions
require(dirname(__FILE__) . '/lib/Exception/ExceptionInterface.php');
require(dirname(__FILE__) . '/lib/Exception/ApiErrorException.php');
require(dirname(__FILE__) . '/lib/Exception/ApiConnectionException.php');
require(dirname(__FILE__) . '/lib/Exception/AuthenticationException.php');
require(dirname(__FILE__) . '/lib/Exception/BadMethodCallException.php');
require(dirname(__FILE__) . '/lib/Exception/CardException.php');
require(dirname(__FILE__) . '/lib/Exception/IdempotencyException.php');
require(dirname(__FILE__) . '/lib/Exception/InvalidArgumentException.php');
require(dirname(__FILE__) . '/lib/Exception/InvalidRequestException.php');
require(dirname(__FILE__) . '/lib/Exception/PermissionException.php');
require(dirname(__FILE__) . '/lib/Exception/RateLimitException.php');
require(dirname(__FILE__) . '/lib/Exception/SignatureVerificationException.php');
require(dirname(__FILE__) . '/lib/Exception/UnexpectedValueException.php');
require(dirname(__FILE__) . '/lib/Exception/UnknownApiErrorException.php');
require(\dirname(__FILE__) . '/lib/Exception/ExceptionInterface.php');
require(\dirname(__FILE__) . '/lib/Exception/ApiErrorException.php');
require(\dirname(__FILE__) . '/lib/Exception/ApiConnectionException.php');
require(\dirname(__FILE__) . '/lib/Exception/AuthenticationException.php');
require(\dirname(__FILE__) . '/lib/Exception/BadMethodCallException.php');
require(\dirname(__FILE__) . '/lib/Exception/CardException.php');
require(\dirname(__FILE__) . '/lib/Exception/IdempotencyException.php');
require(\dirname(__FILE__) . '/lib/Exception/InvalidArgumentException.php');
require(\dirname(__FILE__) . '/lib/Exception/InvalidRequestException.php');
require(\dirname(__FILE__) . '/lib/Exception/PermissionException.php');
require(\dirname(__FILE__) . '/lib/Exception/RateLimitException.php');
require(\dirname(__FILE__) . '/lib/Exception/SignatureVerificationException.php');
require(\dirname(__FILE__) . '/lib/Exception/UnexpectedValueException.php');
require(\dirname(__FILE__) . '/lib/Exception/UnknownApiErrorException.php');

// OAuth exceptions
require(dirname(__FILE__) . '/lib/Exception/OAuth/ExceptionInterface.php');
require(dirname(__FILE__) . '/lib/Exception/OAuth/OAuthErrorException.php');
require(dirname(__FILE__) . '/lib/Exception/OAuth/InvalidClientException.php');
require(dirname(__FILE__) . '/lib/Exception/OAuth/InvalidGrantException.php');
require(dirname(__FILE__) . '/lib/Exception/OAuth/InvalidRequestException.php');
require(dirname(__FILE__) . '/lib/Exception/OAuth/InvalidScopeException.php');
require(dirname(__FILE__) . '/lib/Exception/OAuth/UnknownOAuthErrorException.php');
require(dirname(__FILE__) . '/lib/Exception/OAuth/UnsupportedGrantTypeException.php');
require(dirname(__FILE__) . '/lib/Exception/OAuth/UnsupportedResponseTypeException.php');
require(\dirname(__FILE__) . '/lib/Exception/OAuth/ExceptionInterface.php');
require(\dirname(__FILE__) . '/lib/Exception/OAuth/OAuthErrorException.php');
require(\dirname(__FILE__) . '/lib/Exception/OAuth/InvalidClientException.php');
require(\dirname(__FILE__) . '/lib/Exception/OAuth/InvalidGrantException.php');
require(\dirname(__FILE__) . '/lib/Exception/OAuth/InvalidRequestException.php');
require(\dirname(__FILE__) . '/lib/Exception/OAuth/InvalidScopeException.php');
require(\dirname(__FILE__) . '/lib/Exception/OAuth/UnknownOAuthErrorException.php');
require(\dirname(__FILE__) . '/lib/Exception/OAuth/UnsupportedGrantTypeException.php');
require(\dirname(__FILE__) . '/lib/Exception/OAuth/UnsupportedResponseTypeException.php');

// API operations
require(dirname(__FILE__) . '/lib/ApiOperations/All.php');
require(dirname(__FILE__) . '/lib/ApiOperations/Create.php');
require(dirname(__FILE__) . '/lib/ApiOperations/Delete.php');
require(dirname(__FILE__) . '/lib/ApiOperations/NestedResource.php');
require(dirname(__FILE__) . '/lib/ApiOperations/Request.php');
require(dirname(__FILE__) . '/lib/ApiOperations/Retrieve.php');
require(dirname(__FILE__) . '/lib/ApiOperations/Update.php');
require(\dirname(__FILE__) . '/lib/ApiOperations/All.php');
require(\dirname(__FILE__) . '/lib/ApiOperations/Create.php');
require(\dirname(__FILE__) . '/lib/ApiOperations/Delete.php');
require(\dirname(__FILE__) . '/lib/ApiOperations/NestedResource.php');
require(\dirname(__FILE__) . '/lib/ApiOperations/Request.php');
require(\dirname(__FILE__) . '/lib/ApiOperations/Retrieve.php');
require(\dirname(__FILE__) . '/lib/ApiOperations/Update.php');

// Plumbing
require(dirname(__FILE__) . '/lib/ApiResponse.php');
require(dirname(__FILE__) . '/lib/RequestTelemetry.php');
require(dirname(__FILE__) . '/lib/StripeObject.php');
require(dirname(__FILE__) . '/lib/ApiRequestor.php');
require(dirname(__FILE__) . '/lib/ApiResource.php');
require(dirname(__FILE__) . '/lib/SingletonApiResource.php');
require(\dirname(__FILE__) . '/lib/ApiResponse.php');
require(\dirname(__FILE__) . '/lib/RequestTelemetry.php');
require(\dirname(__FILE__) . '/lib/StripeObject.php');
require(\dirname(__FILE__) . '/lib/ApiRequestor.php');
require(\dirname(__FILE__) . '/lib/ApiResource.php');
require(\dirname(__FILE__) . '/lib/SingletonApiResource.php');

// Stripe API Resources
require(dirname(__FILE__) . '/lib/Account.php');
require(dirname(__FILE__) . '/lib/AccountLink.php');
require(dirname(__FILE__) . '/lib/AlipayAccount.php');
require(dirname(__FILE__) . '/lib/ApplePayDomain.php');
require(dirname(__FILE__) . '/lib/ApplicationFee.php');
require(dirname(__FILE__) . '/lib/ApplicationFeeRefund.php');
require(dirname(__FILE__) . '/lib/Balance.php');
require(dirname(__FILE__) . '/lib/BalanceTransaction.php');
require(dirname(__FILE__) . '/lib/BankAccount.php');
require(dirname(__FILE__) . '/lib/BitcoinReceiver.php');
require(dirname(__FILE__) . '/lib/BitcoinTransaction.php');
require(dirname(__FILE__) . '/lib/Capability.php');
require(dirname(__FILE__) . '/lib/Card.php');
require(dirname(__FILE__) . '/lib/Charge.php');
require(dirname(__FILE__) . '/lib/Checkout/Session.php');
require(dirname(__FILE__) . '/lib/Collection.php');
require(dirname(__FILE__) . '/lib/CountrySpec.php');
require(dirname(__FILE__) . '/lib/Coupon.php');
require(dirname(__FILE__) . '/lib/CreditNote.php');
require(dirname(__FILE__) . '/lib/Customer.php');
require(dirname(__FILE__) . '/lib/CustomerBalanceTransaction.php');
require(dirname(__FILE__) . '/lib/Discount.php');
require(dirname(__FILE__) . '/lib/Dispute.php');
require(dirname(__FILE__) . '/lib/EphemeralKey.php');
require(dirname(__FILE__) . '/lib/ErrorObject.php');
require(dirname(__FILE__) . '/lib/Event.php');
require(dirname(__FILE__) . '/lib/ExchangeRate.php');
require(dirname(__FILE__) . '/lib/File.php');
require(dirname(__FILE__) . '/lib/FileLink.php');
require(dirname(__FILE__) . '/lib/Invoice.php');
require(dirname(__FILE__) . '/lib/InvoiceItem.php');
require(dirname(__FILE__) . '/lib/InvoiceLineItem.php');
require(dirname(__FILE__) . '/lib/Issuing/Authorization.php');
require(dirname(__FILE__) . '/lib/Issuing/Card.php');
require(dirname(__FILE__) . '/lib/Issuing/CardDetails.php');
require(dirname(__FILE__) . '/lib/Issuing/Cardholder.php');
require(dirname(__FILE__) . '/lib/Issuing/Dispute.php');
require(dirname(__FILE__) . '/lib/Issuing/Transaction.php');
require(dirname(__FILE__) . '/lib/LoginLink.php');
require(dirname(__FILE__) . '/lib/Mandate.php');
require(dirname(__FILE__) . '/lib/Order.php');
require(dirname(__FILE__) . '/lib/OrderItem.php');
require(dirname(__FILE__) . '/lib/OrderReturn.php');
require(dirname(__FILE__) . '/lib/PaymentIntent.php');
require(dirname(__FILE__) . '/lib/PaymentMethod.php');
require(dirname(__FILE__) . '/lib/Payout.php');
require(dirname(__FILE__) . '/lib/Person.php');
require(dirname(__FILE__) . '/lib/Plan.php');
require(dirname(__FILE__) . '/lib/Product.php');
require(dirname(__FILE__) . '/lib/Radar/EarlyFraudWarning.php');
require(dirname(__FILE__) . '/lib/Radar/ValueList.php');
require(dirname(__FILE__) . '/lib/Radar/ValueListItem.php');
require(dirname(__FILE__) . '/lib/Recipient.php');
require(dirname(__FILE__) . '/lib/RecipientTransfer.php');
require(dirname(__FILE__) . '/lib/Refund.php');
require(dirname(__FILE__) . '/lib/Reporting/ReportRun.php');
require(dirname(__FILE__) . '/lib/Reporting/ReportType.php');
require(dirname(__FILE__) . '/lib/Review.php');
require(dirname(__FILE__) . '/lib/SetupIntent.php');
require(dirname(__FILE__) . '/lib/Sigma/ScheduledQueryRun.php');
require(dirname(__FILE__) . '/lib/SKU.php');
require(dirname(__FILE__) . '/lib/Source.php');
require(dirname(__FILE__) . '/lib/SourceTransaction.php');
require(dirname(__FILE__) . '/lib/Subscription.php');
require(dirname(__FILE__) . '/lib/SubscriptionItem.php');
require(dirname(__FILE__) . '/lib/SubscriptionSchedule.php');
require(dirname(__FILE__) . '/lib/TaxId.php');
require(dirname(__FILE__) . '/lib/TaxRate.php');
require(dirname(__FILE__) . '/lib/Terminal/ConnectionToken.php');
require(dirname(__FILE__) . '/lib/Terminal/Location.php');
require(dirname(__FILE__) . '/lib/Terminal/Reader.php');
require(dirname(__FILE__) . '/lib/ThreeDSecure.php');
require(dirname(__FILE__) . '/lib/Token.php');
require(dirname(__FILE__) . '/lib/Topup.php');
require(dirname(__FILE__) . '/lib/Transfer.php');
require(dirname(__FILE__) . '/lib/TransferReversal.php');
require(dirname(__FILE__) . '/lib/UsageRecord.php');
require(dirname(__FILE__) . '/lib/UsageRecordSummary.php');
require(dirname(__FILE__) . '/lib/WebhookEndpoint.php');
require(\dirname(__FILE__) . '/lib/Account.php');
require(\dirname(__FILE__) . '/lib/AccountLink.php');
require(\dirname(__FILE__) . '/lib/AlipayAccount.php');
require(\dirname(__FILE__) . '/lib/ApplePayDomain.php');
require(\dirname(__FILE__) . '/lib/ApplicationFee.php');
require(\dirname(__FILE__) . '/lib/ApplicationFeeRefund.php');
require(\dirname(__FILE__) . '/lib/Balance.php');
require(\dirname(__FILE__) . '/lib/BalanceTransaction.php');
require(\dirname(__FILE__) . '/lib/BankAccount.php');
require(\dirname(__FILE__) . '/lib/BitcoinReceiver.php');
require(\dirname(__FILE__) . '/lib/BitcoinTransaction.php');
require(\dirname(__FILE__) . '/lib/Capability.php');
require(\dirname(__FILE__) . '/lib/Card.php');
require(\dirname(__FILE__) . '/lib/Charge.php');
require(\dirname(__FILE__) . '/lib/Checkout/Session.php');
require(\dirname(__FILE__) . '/lib/Collection.php');
require(\dirname(__FILE__) . '/lib/CountrySpec.php');
require(\dirname(__FILE__) . '/lib/Coupon.php');
require(\dirname(__FILE__) . '/lib/CreditNote.php');
require(\dirname(__FILE__) . '/lib/Customer.php');
require(\dirname(__FILE__) . '/lib/CustomerBalanceTransaction.php');
require(\dirname(__FILE__) . '/lib/Discount.php');
require(\dirname(__FILE__) . '/lib/Dispute.php');
require(\dirname(__FILE__) . '/lib/EphemeralKey.php');
require(\dirname(__FILE__) . '/lib/ErrorObject.php');
require(\dirname(__FILE__) . '/lib/Event.php');
require(\dirname(__FILE__) . '/lib/ExchangeRate.php');
require(\dirname(__FILE__) . '/lib/File.php');
require(\dirname(__FILE__) . '/lib/FileLink.php');
require(\dirname(__FILE__) . '/lib/Invoice.php');
require(\dirname(__FILE__) . '/lib/InvoiceItem.php');
require(\dirname(__FILE__) . '/lib/InvoiceLineItem.php');
require(\dirname(__FILE__) . '/lib/Issuing/Authorization.php');
require(\dirname(__FILE__) . '/lib/Issuing/Card.php');
require(\dirname(__FILE__) . '/lib/Issuing/CardDetails.php');
require(\dirname(__FILE__) . '/lib/Issuing/Cardholder.php');
require(\dirname(__FILE__) . '/lib/Issuing/Dispute.php');
require(\dirname(__FILE__) . '/lib/Issuing/Transaction.php');
require(\dirname(__FILE__) . '/lib/LoginLink.php');
require(\dirname(__FILE__) . '/lib/Mandate.php');
require(\dirname(__FILE__) . '/lib/Order.php');
require(\dirname(__FILE__) . '/lib/OrderItem.php');
require(\dirname(__FILE__) . '/lib/OrderReturn.php');
require(\dirname(__FILE__) . '/lib/PaymentIntent.php');
require(\dirname(__FILE__) . '/lib/PaymentMethod.php');
require(\dirname(__FILE__) . '/lib/Payout.php');
require(\dirname(__FILE__) . '/lib/Person.php');
require(\dirname(__FILE__) . '/lib/Plan.php');
require(\dirname(__FILE__) . '/lib/Product.php');
require(\dirname(__FILE__) . '/lib/Radar/EarlyFraudWarning.php');
require(\dirname(__FILE__) . '/lib/Radar/ValueList.php');
require(\dirname(__FILE__) . '/lib/Radar/ValueListItem.php');
require(\dirname(__FILE__) . '/lib/Recipient.php');
require(\dirname(__FILE__) . '/lib/RecipientTransfer.php');
require(\dirname(__FILE__) . '/lib/Refund.php');
require(\dirname(__FILE__) . '/lib/Reporting/ReportRun.php');
require(\dirname(__FILE__) . '/lib/Reporting/ReportType.php');
require(\dirname(__FILE__) . '/lib/Review.php');
require(\dirname(__FILE__) . '/lib/SetupIntent.php');
require(\dirname(__FILE__) . '/lib/Sigma/ScheduledQueryRun.php');
require(\dirname(__FILE__) . '/lib/SKU.php');
require(\dirname(__FILE__) . '/lib/Source.php');
require(\dirname(__FILE__) . '/lib/SourceTransaction.php');
require(\dirname(__FILE__) . '/lib/Subscription.php');
require(\dirname(__FILE__) . '/lib/SubscriptionItem.php');
require(\dirname(__FILE__) . '/lib/SubscriptionSchedule.php');
require(\dirname(__FILE__) . '/lib/TaxId.php');
require(\dirname(__FILE__) . '/lib/TaxRate.php');
require(\dirname(__FILE__) . '/lib/Terminal/ConnectionToken.php');
require(\dirname(__FILE__) . '/lib/Terminal/Location.php');
require(\dirname(__FILE__) . '/lib/Terminal/Reader.php');
require(\dirname(__FILE__) . '/lib/ThreeDSecure.php');
require(\dirname(__FILE__) . '/lib/Token.php');
require(\dirname(__FILE__) . '/lib/Topup.php');
require(\dirname(__FILE__) . '/lib/Transfer.php');
require(\dirname(__FILE__) . '/lib/TransferReversal.php');
require(\dirname(__FILE__) . '/lib/UsageRecord.php');
require(\dirname(__FILE__) . '/lib/UsageRecordSummary.php');
require(\dirname(__FILE__) . '/lib/WebhookEndpoint.php');

// OAuth
require(dirname(__FILE__) . '/lib/OAuth.php');
require(dirname(__FILE__) . '/lib/OAuthErrorObject.php');
require(\dirname(__FILE__) . '/lib/OAuth.php');
require(\dirname(__FILE__) . '/lib/OAuthErrorObject.php');

// Webhooks
require(dirname(__FILE__) . '/lib/Webhook.php');
require(dirname(__FILE__) . '/lib/WebhookSignature.php');
require(\dirname(__FILE__) . '/lib/Webhook.php');
require(\dirname(__FILE__) . '/lib/WebhookSignature.php');
6 changes: 3 additions & 3 deletions lib/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function instanceUrl()
*/
public static function retrieve($id = null, $opts = null)
{
if (!$opts && is_string($id) && substr($id, 0, 3) === 'sk_') {
if (!$opts && \is_string($id) && \substr($id, 0, 3) === 'sk_') {
$opts = $id;
$id = null;
}
Expand Down Expand Up @@ -406,7 +406,7 @@ private function serializeAdditionalOwners($legalEntity, $additionalOwners)
} else {
$originalValue = [];
}
if (($originalValue) && (count($originalValue) > count($additionalOwners))) {
if (($originalValue) && (\count($originalValue) > \count($additionalOwners))) {
throw new Exception\InvalidArgumentException(
"You cannot delete an item from an array, you must instead set a new array"
);
Expand All @@ -418,7 +418,7 @@ private function serializeAdditionalOwners($legalEntity, $additionalOwners)

if ($update !== []) {
if (!$originalValue ||
!array_key_exists($i, $originalValue) ||
!\array_key_exists($i, $originalValue) ||
($update != $legalEntity->serializeParamsValue($originalValue[$i], null, false, true))) {
$updateArr[$i] = $update;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/AlipayAccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public function instanceUrl()
$msg = "Alipay accounts cannot be accessed without a customer ID.";
throw new Exception\UnexpectedValueException($msg);
}
$parentExtn = urlencode(Util\Util::utf8($parent));
$extn = urlencode(Util\Util::utf8($this['id']));
$parentExtn = \urlencode(Util\Util::utf8($parent));
$extn = \urlencode(Util\Util::utf8($this['id']));
return "$base/$parentExtn/$path/$extn";
}

Expand Down
2 changes: 1 addition & 1 deletion lib/ApiOperations/All.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static function all($params = null, $opts = null)
$obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts);
if (!($obj instanceof \Stripe\Collection)) {
throw new \Stripe\Exception\UnexpectedValueException(
'Expected type ' . \Stripe\Collection::class . ', got "' . get_class($obj) . '" instead.'
'Expected type ' . \Stripe\Collection::class . ', got "' . \get_class($obj) . '" instead.'
);
}
$obj->setLastResponse($response);
Expand Down
Loading