From ec203ce72704f4ead6b7fcb01c56f3b08687a67e Mon Sep 17 00:00:00 2001 From: shailesh-google Date: Wed, 22 Apr 2026 16:29:17 +0530 Subject: [PATCH 1/5] added php 8.4 support --- .github/workflows/php-test-workflow.yml | 4 ++++ composer.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/php-test-workflow.yml b/.github/workflows/php-test-workflow.yml index b1c2b78ee..3fa536aa2 100644 --- a/.github/workflows/php-test-workflow.yml +++ b/.github/workflows/php-test-workflow.yml @@ -19,6 +19,10 @@ jobs: dependencies-preference: " " - php: '8.3' dependencies-preference: "--prefer-lowest" + - php: '8.4' + dependencies-preference: " " + - php: '8.4' + dependencies-preference: "--prefer-lowest" fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/composer.json b/composer.json index 7ae14bd88..899efacdb 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "homepage": "http://github.com/apigee/apigee-client-php", "license": "Apache-2.0", "require": { - "php": "~8.2 || ~8.3", + "php": "~8.2 || ~8.3 || ~8.4", "ext-json": "*", "ext-openssl": "*", "ext-reflection": "*", From 5325fed1d35502b04372b3658a8e7b6b992ecacc Mon Sep 17 00:00:00 2001 From: shailesh-google Date: Mon, 4 May 2026 15:42:50 +0530 Subject: [PATCH 2/5] resolved the psalm errors --- composer.json | 2 +- psalm.xml.dist | 12 ++++++++++++ .../Controller/AcceptedRatePlanController.php | 2 +- src/Api/ApigeeX/Controller/ApiProductController.php | 4 ++-- src/Api/ApigeeX/Controller/AppController.php | 2 +- src/Api/ApigeeX/Controller/AppGroupAppController.php | 2 +- .../Controller/AppGroupAppCredentialController.php | 2 +- src/Api/ApigeeX/Controller/AppGroupController.php | 2 +- .../ApigeeX/Controller/AppGroupMembersController.php | 2 +- .../DeveloperAcceptedRatePlanController.php | 2 +- .../Controller/DeveloperBillingTypeController.php | 2 +- .../Controller/DeveloperPrepaidBalanceController.php | 2 +- src/Api/ApigeeX/Controller/RatePlanController.php | 4 ++-- .../Controller/SupportedCurrencyController.php | 2 +- .../Denormalizer/AcceptedRatePlanDenormalizer.php | 2 +- .../ApigeeX/Denormalizer/ApiProductDenormalizer.php | 4 ++-- src/Api/ApigeeX/Denormalizer/AppDenormalizer.php | 4 ++-- .../Denormalizer/AppGroupMembershipDenormalizer.php | 2 +- .../ApigeeX/Denormalizer/BillingTypeDenormalizer.php | 2 +- .../DeveloperAcceptedRatePlanDenormalizer.php | 2 +- .../DeveloperBillingTypeDenormalizer.php | 2 +- .../Denormalizer/PrepaidBalanceDenormalizer.php | 4 ++-- .../ApigeeX/Denormalizer/RatePlanDenormalizer.php | 4 ++-- .../Denormalizer/RatePlanDenormalizerFactory.php | 2 +- .../Denormalizer/RatePlanRateDenormalizer.php | 2 +- .../Denormalizer/StandardRatePlanDenormalizer.php | 2 +- src/Api/ApigeeX/Entity/ApiProduct.php | 2 +- src/Api/ApigeeX/Entity/AppGroup.php | 2 +- src/Api/ApigeeX/Entity/AppGroupApp.php | 2 +- src/Api/ApigeeX/Entity/Balance.php | 2 +- src/Api/ApigeeX/Entity/DeveloperAcceptedRatePlan.php | 2 +- src/Api/ApigeeX/Entity/DeveloperBillingType.php | 2 +- src/Api/ApigeeX/Entity/PrepaidBalance.php | 2 +- .../Entity/Property/NanosPropertyAwareTrait.php | 4 ++-- src/Api/ApigeeX/Entity/StandardRatePlanRevision.php | 2 +- .../ApigeeX/NameConverter/RatePlanNameConverter.php | 1 + .../Normalizer/AcceptedRatePlanNormalizer.php | 3 +++ src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php | 2 +- .../Normalizer/AppGroupMembershipNormalizer.php | 2 +- src/Api/ApigeeX/Normalizer/AppNormalizer.php | 2 +- src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php | 2 +- .../ApigeeX/Normalizer/PrepaidBalanceNormalizer.php | 2 +- .../ApigeeX/Normalizer/RatePlanNormalizerFactory.php | 2 +- .../ApigeeX/Normalizer/RatePlanRateNormalizer.php | 2 +- .../Normalizer/StandardRatePlanNormalizer.php | 2 +- .../Serializer/AcceptedRatePlanSerializer.php | 2 +- src/Api/ApigeeX/Serializer/ApiProductSerializer.php | 2 +- .../ApigeeX/Serializer/AppGroupEntitySerializer.php | 2 +- .../Serializer/AppGroupMembershipSerializer.php | 2 +- src/Api/ApigeeX/Serializer/AppGroupSerializer.php | 2 +- src/Api/ApigeeX/Serializer/BillingTypeSerializer.php | 2 +- .../ApigeeX/Serializer/PrepaidBalanceSerializer.php | 2 +- src/Api/ApigeeX/Serializer/RatePlanSerializer.php | 2 +- .../Management/Controller/ApiProductController.php | 2 +- src/Api/Management/Controller/AppController.php | 2 +- .../AttributesAwareEntityControllerTrait.php | 4 ++-- .../Management/Controller/CompanyAppController.php | 2 +- src/Api/Management/Controller/CompanyController.php | 2 +- .../Controller/CompanyMembersController.php | 2 +- .../Management/Controller/DeveloperAppController.php | 2 +- .../Controller/DeveloperAppCredentialController.php | 2 +- .../Management/Controller/DeveloperController.php | 2 +- .../Management/Controller/EnvironmentController.php | 2 +- .../Management/Controller/OrganizationController.php | 2 +- src/Api/Management/Controller/StatsController.php | 2 +- src/Api/Management/Denormalizer/AppDenormalizer.php | 4 ++-- .../Denormalizer/CompanyMembershipDenormalizer.php | 2 +- src/Api/Management/Entity/ApiProduct.php | 2 +- src/Api/Management/Entity/AppCredential.php | 2 +- src/Api/Management/Entity/Company.php | 2 +- src/Api/Management/Entity/CompanyApp.php | 2 +- src/Api/Management/Entity/Developer.php | 2 +- src/Api/Management/Entity/DeveloperApp.php | 2 +- src/Api/Management/Entity/Environment.php | 2 +- src/Api/Management/Entity/Organization.php | 2 +- .../Exception/DeveloperNotFoundException.php | 2 +- .../Normalizer/AppCredentialNormalizer.php | 2 +- src/Api/Management/Normalizer/AppNormalizer.php | 2 +- .../Normalizer/CompanyMembershipNormalizer.php | 2 +- src/Api/Management/Query/StatsQuery.php | 2 +- src/Api/Management/Query/StatsQueryNormalizer.php | 2 +- .../Management/Serializer/ApiProductSerializer.php | 2 +- .../Serializer/AppCredentialSerializer.php | 2 +- .../Management/Serializer/AppEntitySerializer.php | 2 +- .../Serializer/CompanyMembershipSerializer.php | 2 +- src/Api/Management/Serializer/CompanySerializer.php | 2 +- .../Management/Serializer/DeveloperSerializer.php | 2 +- .../Management/Serializer/EnvironmentSerializer.php | 2 +- .../Management/Serializer/OrganizationSerializer.php | 2 +- .../Controller/AcceptedRatePlanController.php | 4 ++-- .../Monetization/Controller/ApiPackageController.php | 2 +- .../Monetization/Controller/ApiProductController.php | 2 +- .../Controller/CompanyAcceptedRatePlanController.php | 2 +- .../Controller/CompanyActiveRatePlanController.php | 2 +- .../Monetization/Controller/CompanyController.php | 2 +- .../Controller/CompanyPrepaidBalanceController.php | 2 +- .../Controller/CompanyReportDefinitionController.php | 2 +- .../CompanyTermsAndConditionsController.php | 2 +- .../DeveloperAcceptedRatePlanController.php | 2 +- .../Controller/DeveloperActiveRatePlanController.php | 2 +- .../Monetization/Controller/DeveloperController.php | 2 +- .../Controller/DeveloperPrepaidBalanceController.php | 2 +- .../DeveloperReportDefinitionController.php | 2 +- .../Controller/DeveloperRoleController.php | 2 +- .../DeveloperTermsAndConditionsController.php | 2 +- .../Controller/OrganizationProfileController.php | 2 +- .../Controller/PaymentProviderController.php | 2 +- .../Monetization/Controller/RatePlanController.php | 7 +++++-- .../Controller/ReportDefinitionController.php | 2 +- .../Controller/SupportedCurrencyController.php | 2 +- .../Controller/TermsAndConditionsController.php | 2 +- .../Denormalizer/AcceptedRatePlanDenormalizer.php | 2 +- .../Denormalizer/AddressDenormalizer.php | 2 +- .../Denormalizer/ApiPackageDenormalizer.php | 4 ++-- .../Denormalizer/BalanceDenormalizer.php | 4 ++-- .../CompanyAcceptedRatePlanDenormalizer.php | 2 +- .../CompanyPaymentTransactionDenormalizer.php | 2 +- .../Denormalizer/CompanyRatePlanDenormalizer.php | 2 +- .../CompanyReportDefinitionDenormalizer.php | 2 +- .../Denormalizer/DateTimeZoneDenormalizer.php | 2 +- .../DeveloperAcceptedRatePlanDenormalizer.php | 2 +- .../DeveloperCategoryRatePlanDenormalizer.php | 2 +- .../DeveloperPaymentTransactionDenormalizer.php | 2 +- .../Denormalizer/DeveloperRatePlanDenormalizer.php | 2 +- .../DeveloperReportDefinitionDenormalizer.php | 2 +- .../Denormalizer/LegalEntityDenormalizer.php | 4 ++-- .../Denormalizer/OrganizationProfileDenormalizer.php | 4 ++-- .../Denormalizer/PrepaidBalanceDenormalizer.php | 4 ++-- .../Denormalizer/RatePlanDenormalizer.php | 2 +- .../Denormalizer/RatePlanDenormalizerFactory.php | 2 +- .../Denormalizer/RatePlanRateDenormalizer.php | 2 +- .../Denormalizer/ReportCriteriaDenormalizer.php | 2 +- .../Denormalizer/ReportDefinitionDenormalizer.php | 2 +- .../Denormalizer/StandardRatePlanDenormalizer.php | 2 +- .../Denormalizer/SupportedCurrencyDenormalizer.php | 4 ++-- .../Denormalizer/TermsAndConditionsDenormalizer.php | 4 ++-- src/Api/Monetization/Entity/ApiPackage.php | 2 +- src/Api/Monetization/Entity/ApiProduct.php | 2 +- src/Api/Monetization/Entity/Balance.php | 2 +- src/Api/Monetization/Entity/Company.php | 2 +- .../Monetization/Entity/CompanyAcceptedRatePlan.php | 2 +- .../Monetization/Entity/CompanyRatePlanRevision.php | 2 +- .../Monetization/Entity/CompanyReportDefinition.php | 2 +- src/Api/Monetization/Entity/Developer.php | 2 +- .../Entity/DeveloperAcceptedRatePlan.php | 2 +- src/Api/Monetization/Entity/DeveloperCategory.php | 2 +- .../Entity/DeveloperCategoryRatePlanRevision.php | 2 +- .../Entity/DeveloperRatePlanRevision.php | 2 +- .../Entity/DeveloperReportDefinition.php | 2 +- src/Api/Monetization/Entity/DeveloperRole.php | 2 +- src/Api/Monetization/Entity/OrganizationProfile.php | 2 +- src/Api/Monetization/Entity/PaymentProvider.php | 2 +- src/Api/Monetization/Entity/PrepaidBalance.php | 2 +- .../Monetization/Entity/StandardRatePlanRevision.php | 2 +- src/Api/Monetization/Entity/SupportedCurrency.php | 2 +- src/Api/Monetization/Entity/TermsAndConditions.php | 2 +- .../NameConverter/AddressNameConverter.php | 2 +- .../NameConverter/ApiPackageNameConverter.php | 2 +- .../NameConverter/BalanceNameConverter.php | 2 +- .../CompanyAcceptedRatePlanNameConverter.php | 2 +- .../CompanyPaymentTransactionNameConverter.php | 2 +- .../NameConverter/CompanyRatePlanNameConverter.php | 2 +- .../CompanyReportDefinitionNameConverter.php | 2 +- .../NameConverter/LegalEntityNameConvert.php | 2 +- .../OrganizationProfileNameConverter.php | 2 +- .../NameConverter/PrepaidBalanceNameConverter.php | 2 +- .../NameConverter/ReportCriteriaNameConverter.php | 2 +- .../NameConverter/SupportedCurrencyNameConverter.php | 2 +- .../TermsAndConditionsNameConverter.php | 2 +- .../Monetization/Normalizer/AddressNormalizer.php | 2 +- .../Monetization/Normalizer/ApiPackageNormalizer.php | 2 +- .../Monetization/Normalizer/BalanceNormalizer.php | 2 +- .../Normalizer/CompanyAcceptedRatePlanNormalizer.php | 2 +- .../CompanyPaymentTransactionNormalizer.php | 2 +- .../Normalizer/CompanyRatePlanNormalizer.php | 2 +- .../Normalizer/CompanyReportDefinitionNormalizer.php | 2 +- .../Normalizer/DateTimeZoneNormalizer.php | 2 +- .../DeveloperCategoryRatePlanNormalizer.php | 2 +- .../DeveloperPaymentTransactionNormalizer.php | 2 +- .../Normalizer/DeveloperRatePlanNormalizer.php | 2 +- .../DeveloperReportDefinitionNormalizer.php | 2 +- src/Api/Monetization/Normalizer/EntityNormalizer.php | 1 - .../Normalizer/LegalEntityNormalizer.php | 2 +- .../Normalizer/OrganizationProfileNormalizer.php | 2 +- .../Normalizer/PrepaidBalanceNormalizer.php | 2 +- .../Normalizer/RatePlanNormalizerFactory.php | 2 +- .../Normalizer/RatePlanRateNormalizer.php | 2 +- .../Normalizer/ReportCriteriaNormalizer.php | 2 +- .../Normalizer/StandardRatePlanNormalizer.php | 2 +- .../Normalizer/SupportedCurrencyNormalizer.php | 2 +- .../Normalizer/TermsAndConditionsNormalizer.php | 2 +- .../Serializer/AcceptedRatePlanSerializer.php | 2 +- .../Monetization/Serializer/AddressSerializer.php | 2 +- .../Monetization/Serializer/ApiPackageSerializer.php | 2 +- .../Monetization/Serializer/BalanceSerializer.php | 2 +- .../Serializer/LegalEntitySerializer.php | 2 +- .../LegalEntityTermsAndConditionsSerializer.php | 2 +- .../Serializer/OrganizationProfileSerializer.php | 2 +- .../Serializer/PaymentTransactionSerializer.php | 2 +- .../Serializer/PrepaidBalanceSerializer.php | 2 +- .../Monetization/Serializer/RatePlanSerializer.php | 2 +- .../Serializer/ReportDefinitionSerializer.php | 2 +- .../Serializer/SupportedCurrencySerializer.php | 2 +- .../Serializer/TermsAndConditionsSerializer.php | 2 +- .../Utility/TimezoneFixerHelperTrait.php | 2 -- src/Client.php | 1 + src/Controller/PaginationHelperTrait.php | 10 +++++----- src/Denormalizer/AttributesPropertyDenormalizer.php | 2 +- src/Denormalizer/CredentialProductDenormalizer.php | 4 ++-- src/Denormalizer/EdgeDateDenormalizer.php | 2 +- src/Denormalizer/KeyValueMapDenormalizer.php | 2 +- src/Denormalizer/PropertiesPropertyDenormalizer.php | 2 +- .../ApigeeOnGcpOauth2AuthenticationException.php | 2 +- src/Exception/ClientErrorException.php | 2 +- src/Exception/CpsNotEnabledException.php | 2 +- .../HybridOauth2AuthenticationException.php | 2 +- src/Exception/InvalidArgumentException.php | 2 +- src/Exception/InvalidJsonException.php | 2 +- .../OauthAccessTokenAuthenticationException.php | 2 +- src/Exception/OauthAuthenticationException.php | 2 +- src/Exception/OauthRefreshTokenExpiredException.php | 2 +- src/Exception/ServerErrorException.php | 2 +- src/Exception/UnexpectedValueException.php | 2 +- src/Exception/UninitializedPropertyException.php | 2 +- .../Plugin/Authentication/ApigeeOnGcpOauth2.php | 1 + .../Plugin/Authentication/GceServiceAccount.php | 2 +- .../Plugin/Authentication/HybridOauth2.php | 1 + .../Plugin/Authentication/NullAuthentication.php | 2 +- src/HttpClient/Plugin/Authentication/Oauth.php | 2 ++ .../Plugin/RetryOauthAuthenticationPlugin.php | 2 +- src/HttpClient/Utility/Builder.php | 8 +++----- src/Normalizer/CredentialProductNormalizer.php | 2 +- src/Normalizer/EdgeDateNormalizer.php | 2 +- src/Normalizer/PropertiesPropertyNormalizer.php | 2 +- src/PropertyAccess/PropertyAccessorDecorator.php | 1 - src/Structure/ObjectCopyHelperTrait.php | 1 - .../Controller/PrepaidBalanceControllerTestBase.php | 2 -- .../Controller/PrepaidBalanceControllerTestBase.php | 2 -- .../Controller/TimezoneConversionTestTrait.php | 1 - .../PaymentTransactionPropertyValidator.php | 1 - .../PropertyAccess/PropertyAccessorDecoratorTest.php | 5 ++++- tests/Serializer/EntitySerializerTest.php | 2 -- tests/Test/Controller/EntityControllerTestBase.php | 2 -- 243 files changed, 278 insertions(+), 268 deletions(-) diff --git a/composer.json b/composer.json index 899efacdb..440a4526d 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,7 @@ "phpunit/phpunit": "^9.6", "sebastian/comparator": "^4.0.5", "symfony/cache": "^6.4.9", - "vimeo/psalm": "^5.20" + "vimeo/psalm": "^6.14.0" }, "autoload": { "psr-4": { diff --git a/psalm.xml.dist b/psalm.xml.dist index 065e811dd..7120d0a09 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -54,6 +54,18 @@ + + + + + + + + + + + + diff --git a/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php b/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php index 29f19c564..6d3d81c0b 100755 --- a/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php +++ b/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php @@ -89,7 +89,7 @@ public function acceptRatePlan(RatePlanInterface $ratePlan): AcceptedRatePlanInt $tmp = json_decode($payload, true); - $payload = json_encode($tmp); + $payload = (string) json_encode($tmp); $response = $this->client->post($this->getBaseEndpointUri(), $payload); $this->getEntitySerializer()->setPropertiesFromResponse($response, $acceptedRatePlan); diff --git a/src/Api/ApigeeX/Controller/ApiProductController.php b/src/Api/ApigeeX/Controller/ApiProductController.php index 696eb99a9..cf08ca5da 100755 --- a/src/Api/ApigeeX/Controller/ApiProductController.php +++ b/src/Api/ApigeeX/Controller/ApiProductController.php @@ -30,7 +30,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class ApiProductController extends OrganizationAwareEntityController implements ApiProductControllerInterface +final class ApiProductController extends OrganizationAwareEntityController implements ApiProductControllerInterface { use EntityCreateOperationControllerTrait; use EntityDeleteOperationControllerTrait; @@ -134,7 +134,7 @@ private function getEligibleProducts(string $type, string $entityId): array } } - $current_ms = substr((string) (microtime(true) * 1000), 0); + $current_ms = substr((string) ((int) (microtime(true) * 1000.0)), 0); foreach ($this->getAvailablexApiProducts($type, $entityId, true) as $item) { // Create a new rate plan controller. diff --git a/src/Api/ApigeeX/Controller/AppController.php b/src/Api/ApigeeX/Controller/AppController.php index 0989a9c2f..71735b24e 100644 --- a/src/Api/ApigeeX/Controller/AppController.php +++ b/src/Api/ApigeeX/Controller/AppController.php @@ -32,7 +32,7 @@ /** * Class AppController. */ -class AppController extends PaginatedEntityController implements AppControllerInterface +final class AppController extends PaginatedEntityController implements AppControllerInterface { use EntityListingControllerTrait; use PaginationHelperTrait { diff --git a/src/Api/ApigeeX/Controller/AppGroupAppController.php b/src/Api/ApigeeX/Controller/AppGroupAppController.php index c508a4ece..80551350b 100644 --- a/src/Api/ApigeeX/Controller/AppGroupAppController.php +++ b/src/Api/ApigeeX/Controller/AppGroupAppController.php @@ -30,7 +30,7 @@ /** * Class AppGroupAppController. */ -class AppGroupAppController extends AppByOwnerController implements AppGroupAppControllerInterface +final class AppGroupAppController extends AppByOwnerController implements AppGroupAppControllerInterface { use AppGroupAwareControllerTrait; diff --git a/src/Api/ApigeeX/Controller/AppGroupAppCredentialController.php b/src/Api/ApigeeX/Controller/AppGroupAppCredentialController.php index a9419a7ec..530a7ad28 100644 --- a/src/Api/ApigeeX/Controller/AppGroupAppCredentialController.php +++ b/src/Api/ApigeeX/Controller/AppGroupAppCredentialController.php @@ -27,7 +27,7 @@ /** * Class AppGroupAppCredentialController. */ -class AppGroupAppCredentialController extends CompanyAppCredentialController +final class AppGroupAppCredentialController extends CompanyAppCredentialController { /** @var string appgroup name. */ protected $appGroup; diff --git a/src/Api/ApigeeX/Controller/AppGroupController.php b/src/Api/ApigeeX/Controller/AppGroupController.php index c53cb26a6..ca262d325 100644 --- a/src/Api/ApigeeX/Controller/AppGroupController.php +++ b/src/Api/ApigeeX/Controller/AppGroupController.php @@ -33,7 +33,7 @@ /** * Class AppGroupController. */ -class AppGroupController extends PaginatedEntityController implements AppGroupControllerInterface +final class AppGroupController extends PaginatedEntityController implements AppGroupControllerInterface { use AttributesAwareEntityControllerTrait; use EntityCrudOperationsControllerTrait; diff --git a/src/Api/ApigeeX/Controller/AppGroupMembersController.php b/src/Api/ApigeeX/Controller/AppGroupMembersController.php index d96cbe557..3c60570e7 100644 --- a/src/Api/ApigeeX/Controller/AppGroupMembersController.php +++ b/src/Api/ApigeeX/Controller/AppGroupMembersController.php @@ -30,7 +30,7 @@ /** * Allows to manage appgroup memberships. */ -class AppGroupMembersController extends AbstractController implements AppGroupMembersControllerInterface +final class AppGroupMembersController extends AbstractController implements AppGroupMembersControllerInterface { use AppGroupAwareControllerTrait; use OrganizationAwareControllerTrait; diff --git a/src/Api/ApigeeX/Controller/DeveloperAcceptedRatePlanController.php b/src/Api/ApigeeX/Controller/DeveloperAcceptedRatePlanController.php index 60ba2ed9e..6967a2af5 100755 --- a/src/Api/ApigeeX/Controller/DeveloperAcceptedRatePlanController.php +++ b/src/Api/ApigeeX/Controller/DeveloperAcceptedRatePlanController.php @@ -25,7 +25,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class DeveloperAcceptedRatePlanController extends AcceptedRatePlanController +final class DeveloperAcceptedRatePlanController extends AcceptedRatePlanController { /** * UUID or email address of a developer. diff --git a/src/Api/ApigeeX/Controller/DeveloperBillingTypeController.php b/src/Api/ApigeeX/Controller/DeveloperBillingTypeController.php index c43981bce..7f1095075 100644 --- a/src/Api/ApigeeX/Controller/DeveloperBillingTypeController.php +++ b/src/Api/ApigeeX/Controller/DeveloperBillingTypeController.php @@ -23,7 +23,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class DeveloperBillingTypeController extends BillingTypeController +final class DeveloperBillingTypeController extends BillingTypeController { /** * Email address of a developer. diff --git a/src/Api/ApigeeX/Controller/DeveloperPrepaidBalanceController.php b/src/Api/ApigeeX/Controller/DeveloperPrepaidBalanceController.php index e0f4fb347..bb82569aa 100644 --- a/src/Api/ApigeeX/Controller/DeveloperPrepaidBalanceController.php +++ b/src/Api/ApigeeX/Controller/DeveloperPrepaidBalanceController.php @@ -22,7 +22,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class DeveloperPrepaidBalanceController extends PrepaidBalanceController implements DeveloperPrepaidBalanceControllerInterface +final class DeveloperPrepaidBalanceController extends PrepaidBalanceController implements DeveloperPrepaidBalanceControllerInterface { /** * Email address of a developer. diff --git a/src/Api/ApigeeX/Controller/RatePlanController.php b/src/Api/ApigeeX/Controller/RatePlanController.php index bb5f414f8..59412700c 100755 --- a/src/Api/ApigeeX/Controller/RatePlanController.php +++ b/src/Api/ApigeeX/Controller/RatePlanController.php @@ -30,7 +30,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class RatePlanController extends OrganizationAwareEntityController implements RatePlanControllerInterface +final class RatePlanController extends OrganizationAwareEntityController implements RatePlanControllerInterface { use EntityCrudOperationsControllerTrait { buildEntityCreatePayload as private traitBuildContextForEntityTransformerInCreate; @@ -92,7 +92,7 @@ public function getEntities(?bool $showCurrentOnly = null, ?bool $showPrivate = public function createNewRevision(RatePlanRevisionInterface $entity): void { $payload = $this->getEntitySerializer()->serialize($entity, 'json'); - $response = $this->getClient()->post($this->getEntityEndpointUri($entity->getPreviousRatePlanRevision()->id()) . '/revision', $payload); + $response = $this->getClient()->post((string) $this->getEntityEndpointUri($entity->getPreviousRatePlanRevision()->id()) . '/revision', $payload); $this->getEntitySerializer()->setPropertiesFromResponse($response, $entity); } diff --git a/src/Api/ApigeeX/Controller/SupportedCurrencyController.php b/src/Api/ApigeeX/Controller/SupportedCurrencyController.php index eda454151..1a46d90c4 100644 --- a/src/Api/ApigeeX/Controller/SupportedCurrencyController.php +++ b/src/Api/ApigeeX/Controller/SupportedCurrencyController.php @@ -23,7 +23,7 @@ use Apigee\Edge\Controller\EntityListingControllerTrait; use Psr\Http\Message\UriInterface; -class SupportedCurrencyController extends EntityController implements SupportedCurrencyControllerInterface +final class SupportedCurrencyController extends EntityController implements SupportedCurrencyControllerInterface { use EntityListingControllerTrait; diff --git a/src/Api/ApigeeX/Denormalizer/AcceptedRatePlanDenormalizer.php b/src/Api/ApigeeX/Denormalizer/AcceptedRatePlanDenormalizer.php index 4a8130b5c..e273b71c4 100755 --- a/src/Api/ApigeeX/Denormalizer/AcceptedRatePlanDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/AcceptedRatePlanDenormalizer.php @@ -50,6 +50,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return AcceptedRatePlanInterface::class === $type || $type instanceof AcceptedRatePlanInterface || in_array(AcceptedRatePlanInterface::class, class_implements($type)); + return AcceptedRatePlanInterface::class === $type || $type instanceof AcceptedRatePlanInterface || in_array(AcceptedRatePlanInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/ApigeeX/Denormalizer/ApiProductDenormalizer.php b/src/Api/ApigeeX/Denormalizer/ApiProductDenormalizer.php index 51b009515..4d88c0a66 100755 --- a/src/Api/ApigeeX/Denormalizer/ApiProductDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/ApiProductDenormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class ApiProductDenormalizer extends ObjectDenormalizer +final class ApiProductDenormalizer extends ObjectDenormalizer { /** * ApiProductDenormalizer constructor. @@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return ApiProductInterface::class === $type || $type instanceof ApiProductInterface || in_array(ApiProductInterface::class, class_implements($type)); + return ApiProductInterface::class === $type || $type instanceof ApiProductInterface || in_array(ApiProductInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/ApigeeX/Denormalizer/AppDenormalizer.php b/src/Api/ApigeeX/Denormalizer/AppDenormalizer.php index 89e048fce..3c7c87542 100644 --- a/src/Api/ApigeeX/Denormalizer/AppDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/AppDenormalizer.php @@ -27,7 +27,7 @@ /** * Dynamically denormalizes apps to developer- or appgroup apps. */ -class AppDenormalizer extends ObjectDenormalizer +final class AppDenormalizer extends ObjectDenormalizer { /** * Fully qualified class name of the developer app entity. @@ -68,7 +68,7 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return AppInterface::class === $type || $type instanceof AppInterface || in_array(AppInterface::class, class_implements($type)); + return AppInterface::class === $type || $type instanceof AppInterface || in_array(AppInterface::class, class_implements($type) ?: []); } /** diff --git a/src/Api/ApigeeX/Denormalizer/AppGroupMembershipDenormalizer.php b/src/Api/ApigeeX/Denormalizer/AppGroupMembershipDenormalizer.php index 357e29121..c636b01b4 100644 --- a/src/Api/ApigeeX/Denormalizer/AppGroupMembershipDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/AppGroupMembershipDenormalizer.php @@ -24,7 +24,7 @@ /** * Denormalizes appgroup membership data. */ -class AppGroupMembershipDenormalizer implements DenormalizerInterface +final class AppGroupMembershipDenormalizer implements DenormalizerInterface { /** * {@inheritdoc} diff --git a/src/Api/ApigeeX/Denormalizer/BillingTypeDenormalizer.php b/src/Api/ApigeeX/Denormalizer/BillingTypeDenormalizer.php index ab98d1297..bdfffe380 100644 --- a/src/Api/ApigeeX/Denormalizer/BillingTypeDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/BillingTypeDenormalizer.php @@ -44,6 +44,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return BillingTypeInterface::class === $type || $type instanceof BillingTypeInterface || in_array(BillingTypeInterface::class, class_implements($type)); + return BillingTypeInterface::class === $type || $type instanceof BillingTypeInterface || in_array(BillingTypeInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/ApigeeX/Denormalizer/DeveloperAcceptedRatePlanDenormalizer.php b/src/Api/ApigeeX/Denormalizer/DeveloperAcceptedRatePlanDenormalizer.php index d76f95fd7..a5e9575b1 100755 --- a/src/Api/ApigeeX/Denormalizer/DeveloperAcceptedRatePlanDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/DeveloperAcceptedRatePlanDenormalizer.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\DeveloperAcceptedRatePlan; -class DeveloperAcceptedRatePlanDenormalizer extends AcceptedRatePlanDenormalizer +final class DeveloperAcceptedRatePlanDenormalizer extends AcceptedRatePlanDenormalizer { /** * Fully qualified class name of the developer accepted rate plan entity. diff --git a/src/Api/ApigeeX/Denormalizer/DeveloperBillingTypeDenormalizer.php b/src/Api/ApigeeX/Denormalizer/DeveloperBillingTypeDenormalizer.php index 976ca911f..793d1a548 100644 --- a/src/Api/ApigeeX/Denormalizer/DeveloperBillingTypeDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/DeveloperBillingTypeDenormalizer.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\DeveloperBillingType; -class DeveloperBillingTypeDenormalizer extends BillingTypeDenormalizer +final class DeveloperBillingTypeDenormalizer extends BillingTypeDenormalizer { /** * Fully qualified class name of the developer billing type. diff --git a/src/Api/ApigeeX/Denormalizer/PrepaidBalanceDenormalizer.php b/src/Api/ApigeeX/Denormalizer/PrepaidBalanceDenormalizer.php index ea42fe34e..36e6a49c4 100755 --- a/src/Api/ApigeeX/Denormalizer/PrepaidBalanceDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/PrepaidBalanceDenormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class PrepaidBalanceDenormalizer extends ObjectDenormalizer +final class PrepaidBalanceDenormalizer extends ObjectDenormalizer { /** * PrepaidBalanceDenormalizer constructor. @@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return PrepaidBalanceInterface::class === $type || $type instanceof PrepaidBalanceInterface || in_array(PrepaidBalanceInterface::class, class_implements($type)); + return PrepaidBalanceInterface::class === $type || $type instanceof PrepaidBalanceInterface || in_array(PrepaidBalanceInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php index 1494d83e4..9e34c66ca 100755 --- a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php @@ -72,6 +72,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type)); - } + return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type) ?: []); +} } diff --git a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php index c64cca650..0d32b03fb 100755 --- a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php +++ b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\SerializerAwareTrait; use Symfony\Component\Serializer\SerializerInterface; -class RatePlanDenormalizerFactory implements DenormalizerInterface, SerializerAwareInterface +final class RatePlanDenormalizerFactory implements DenormalizerInterface, SerializerAwareInterface { use SerializerAwareTrait { setSerializer as private traitSetSerializer; diff --git a/src/Api/ApigeeX/Denormalizer/RatePlanRateDenormalizer.php b/src/Api/ApigeeX/Denormalizer/RatePlanRateDenormalizer.php index 434a60e5b..f73e5db0f 100755 --- a/src/Api/ApigeeX/Denormalizer/RatePlanRateDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/RatePlanRateDenormalizer.php @@ -24,7 +24,7 @@ use Apigee\Edge\Denormalizer\ObjectDenormalizer; use Symfony\Component\Serializer\Exception\UnexpectedValueException; -class RatePlanRateDenormalizer extends ObjectDenormalizer +final class RatePlanRateDenormalizer extends ObjectDenormalizer { protected $revShareClass = RatePlanRateRevShare::class; diff --git a/src/Api/ApigeeX/Denormalizer/StandardRatePlanDenormalizer.php b/src/Api/ApigeeX/Denormalizer/StandardRatePlanDenormalizer.php index cdc0f72b9..2f6ebe565 100755 --- a/src/Api/ApigeeX/Denormalizer/StandardRatePlanDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/StandardRatePlanDenormalizer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\StandardRatePlan; use Apigee\Edge\Api\ApigeeX\Entity\StandardRatePlanRevision; -class StandardRatePlanDenormalizer extends RatePlanDenormalizer +final class StandardRatePlanDenormalizer extends RatePlanDenormalizer { /** * Fully qualified class name of the standard rate plan entity. diff --git a/src/Api/ApigeeX/Entity/ApiProduct.php b/src/Api/ApigeeX/Entity/ApiProduct.php index d2cdedee2..a3e6e00ae 100755 --- a/src/Api/ApigeeX/Entity/ApiProduct.php +++ b/src/Api/ApigeeX/Entity/ApiProduct.php @@ -24,7 +24,7 @@ use Apigee\Edge\Entity\Property\DisplayNamePropertyAwareTrait; use Apigee\Edge\Entity\Property\NamePropertyAwareTrait; -class ApiProduct extends Entity implements ApiProductInterface +final class ApiProduct extends Entity implements ApiProductInterface { use AttributesPropertyAwareTrait; use DescriptionPropertyAwareTrait; diff --git a/src/Api/ApigeeX/Entity/AppGroup.php b/src/Api/ApigeeX/Entity/AppGroup.php index 0c8dead02..133dfbeab 100644 --- a/src/Api/ApigeeX/Entity/AppGroup.php +++ b/src/Api/ApigeeX/Entity/AppGroup.php @@ -29,7 +29,7 @@ /** * Describes an AppGroup entity. */ -class AppGroup extends Entity implements AppGroupInterface +final class AppGroup extends Entity implements AppGroupInterface { use DisplayNamePropertyAwareTrait; use NamePropertyAwareTrait; diff --git a/src/Api/ApigeeX/Entity/AppGroupApp.php b/src/Api/ApigeeX/Entity/AppGroupApp.php index 63e4bdf38..341b8645c 100644 --- a/src/Api/ApigeeX/Entity/AppGroupApp.php +++ b/src/Api/ApigeeX/Entity/AppGroupApp.php @@ -23,7 +23,7 @@ /** * Class AppGroupApp. */ -class AppGroupApp extends App implements AppGroupAppInterface +final class AppGroupApp extends App implements AppGroupAppInterface { /** @var string */ protected $appGroup; diff --git a/src/Api/ApigeeX/Entity/Balance.php b/src/Api/ApigeeX/Entity/Balance.php index bd3f26699..f080493ce 100755 --- a/src/Api/ApigeeX/Entity/Balance.php +++ b/src/Api/ApigeeX/Entity/Balance.php @@ -23,7 +23,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\Property\UnitsPropertyAwareTrait; use Apigee\Edge\Api\Monetization\Entity\Entity; -class Balance extends Entity +final class Balance extends Entity { use CurrencyCodePropertyAwareTrait; use NanosPropertyAwareTrait; diff --git a/src/Api/ApigeeX/Entity/DeveloperAcceptedRatePlan.php b/src/Api/ApigeeX/Entity/DeveloperAcceptedRatePlan.php index 5214f0af2..b772d271c 100755 --- a/src/Api/ApigeeX/Entity/DeveloperAcceptedRatePlan.php +++ b/src/Api/ApigeeX/Entity/DeveloperAcceptedRatePlan.php @@ -23,7 +23,7 @@ /** * Represents an accepted rate plan by a developer. */ -class DeveloperAcceptedRatePlan extends AcceptedRatePlan implements DeveloperAcceptedRatePlanInterface +final class DeveloperAcceptedRatePlan extends AcceptedRatePlan implements DeveloperAcceptedRatePlanInterface { use DeveloperPropertyAwareTrait; } diff --git a/src/Api/ApigeeX/Entity/DeveloperBillingType.php b/src/Api/ApigeeX/Entity/DeveloperBillingType.php index 477346305..de086c781 100644 --- a/src/Api/ApigeeX/Entity/DeveloperBillingType.php +++ b/src/Api/ApigeeX/Entity/DeveloperBillingType.php @@ -21,6 +21,6 @@ /** * Represents billing type of a developer. */ -class DeveloperBillingType extends BillingType implements DeveloperBillingTypeInterface +final class DeveloperBillingType extends BillingType implements DeveloperBillingTypeInterface { } diff --git a/src/Api/ApigeeX/Entity/PrepaidBalance.php b/src/Api/ApigeeX/Entity/PrepaidBalance.php index 473e948e8..be607fbe4 100755 --- a/src/Api/ApigeeX/Entity/PrepaidBalance.php +++ b/src/Api/ApigeeX/Entity/PrepaidBalance.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\Entity; -class PrepaidBalance extends Entity implements PrepaidBalanceInterface +final class PrepaidBalance extends Entity implements PrepaidBalanceInterface { /** @var string|null */ protected $lastCreditTime; diff --git a/src/Api/ApigeeX/Entity/Property/NanosPropertyAwareTrait.php b/src/Api/ApigeeX/Entity/Property/NanosPropertyAwareTrait.php index 47bc2e201..f049eaab6 100755 --- a/src/Api/ApigeeX/Entity/Property/NanosPropertyAwareTrait.php +++ b/src/Api/ApigeeX/Entity/Property/NanosPropertyAwareTrait.php @@ -33,9 +33,9 @@ trait NanosPropertyAwareTrait */ public function getNanos(): ?float { - $nanos = $this->nanos ?? 0; + $nanos = $this->nanos ?? 0.0; - return $nanos * pow(10, -9); + return $nanos * 1e-9; } /** diff --git a/src/Api/ApigeeX/Entity/StandardRatePlanRevision.php b/src/Api/ApigeeX/Entity/StandardRatePlanRevision.php index 069ee7f8a..94936dac6 100755 --- a/src/Api/ApigeeX/Entity/StandardRatePlanRevision.php +++ b/src/Api/ApigeeX/Entity/StandardRatePlanRevision.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\Property\KeepOriginalStartDatePropertyAwareTrait; use Apigee\Edge\Api\Monetization\Entity\Property\PreviousRatePlanRevisionPropertyAwareTrait; -class StandardRatePlanRevision extends StandardRatePlan implements RatePlanRevisionInterface +final class StandardRatePlanRevision extends StandardRatePlan implements RatePlanRevisionInterface { use KeepOriginalStartDatePropertyAwareTrait; use PreviousRatePlanRevisionPropertyAwareTrait; diff --git a/src/Api/ApigeeX/NameConverter/RatePlanNameConverter.php b/src/Api/ApigeeX/NameConverter/RatePlanNameConverter.php index 14fc3c723..414c54180 100755 --- a/src/Api/ApigeeX/NameConverter/RatePlanNameConverter.php +++ b/src/Api/ApigeeX/NameConverter/RatePlanNameConverter.php @@ -25,6 +25,7 @@ * Maps rate plan properties from the API response to their destination properties. * * @see \Apigee\Edge\Api\ApigeeX\Entity\RatePlan + * @psalm-suppress ClassMustBeFinal */ class RatePlanNameConverter extends NameConverterBase implements NameConverterInterface { diff --git a/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php index e84a51c48..5a38c486a 100755 --- a/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php @@ -22,6 +22,9 @@ use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; +/** + * @psalm-suppress ClassMustBeFinal + */ class AcceptedRatePlanNormalizer extends EntityNormalizer { use TimezoneFixerHelperTrait; diff --git a/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php b/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php index 05ab9e6c5..b9e3ae24c 100755 --- a/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class ApiProductNormalizer extends EntityNormalizer +final class ApiProductNormalizer extends EntityNormalizer { /** * ApiProductNormalizer constructor. diff --git a/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php b/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php index f0fba9e9f..d5ab737d3 100644 --- a/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\ApigeeX\Structure\AppGroupMembership; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class AppGroupMembershipNormalizer implements NormalizerInterface +final class AppGroupMembershipNormalizer implements NormalizerInterface { /** * {@inheritdoc} diff --git a/src/Api/ApigeeX/Normalizer/AppNormalizer.php b/src/Api/ApigeeX/Normalizer/AppNormalizer.php index 3f7b3564a..ae4a9469d 100644 --- a/src/Api/ApigeeX/Normalizer/AppNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AppNormalizer.php @@ -25,7 +25,7 @@ /** * Class AppNormalizer. */ -class AppNormalizer extends ObjectNormalizer implements NormalizerInterface +final class AppNormalizer extends ObjectNormalizer implements NormalizerInterface { /** * {@inheritdoc} diff --git a/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php b/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php index a7e73b0da..1aa704212 100644 --- a/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\BillingTypeInterface; use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; -class BillingTypeNormalizer extends EntityNormalizer +final class BillingTypeNormalizer extends EntityNormalizer { /** * {@inheritdoc} diff --git a/src/Api/ApigeeX/Normalizer/PrepaidBalanceNormalizer.php b/src/Api/ApigeeX/Normalizer/PrepaidBalanceNormalizer.php index 72f9bb10a..e63df2718 100755 --- a/src/Api/ApigeeX/Normalizer/PrepaidBalanceNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/PrepaidBalanceNormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class PrepaidBalanceNormalizer extends EntityNormalizer +final class PrepaidBalanceNormalizer extends EntityNormalizer { /** * PrepaidBalanceNormalizer constructor. diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php index 3debb38aa..a54f15e6f 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\SerializerAwareTrait; use Symfony\Component\Serializer\SerializerInterface; -class RatePlanNormalizerFactory implements NormalizerInterface, SerializerAwareInterface +final class RatePlanNormalizerFactory implements NormalizerInterface, SerializerAwareInterface { use SerializerAwareTrait { setSerializer as private traitSetSerializer; diff --git a/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php b/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php index e2626f1c2..50c7cd1e5 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Api\Monetization\Structure\RatePlanRateRevShare; use Apigee\Edge\Normalizer\ObjectNormalizer; -class RatePlanRateNormalizer extends ObjectNormalizer +final class RatePlanRateNormalizer extends ObjectNormalizer { /** * {@inheritdoc} diff --git a/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php index dda8754f9..ad4538384 100755 --- a/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\RatePlanInterface; use Apigee\Edge\Api\ApigeeX\Entity\StandardRatePlanInterface; -class StandardRatePlanNormalizer extends RatePlanNormalizer +final class StandardRatePlanNormalizer extends RatePlanNormalizer { /** * {@inheritdoc} diff --git a/src/Api/ApigeeX/Serializer/AcceptedRatePlanSerializer.php b/src/Api/ApigeeX/Serializer/AcceptedRatePlanSerializer.php index 82dedb964..d61528dad 100755 --- a/src/Api/ApigeeX/Serializer/AcceptedRatePlanSerializer.php +++ b/src/Api/ApigeeX/Serializer/AcceptedRatePlanSerializer.php @@ -26,7 +26,7 @@ use Apigee\Edge\Api\Monetization\Serializer\LegalEntitySerializer; use Apigee\Edge\Api\Monetization\Serializer\RatePlanSerializer; -class AcceptedRatePlanSerializer extends EntitySerializer +final class AcceptedRatePlanSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/ApigeeX/Serializer/ApiProductSerializer.php b/src/Api/ApigeeX/Serializer/ApiProductSerializer.php index ad9bb169f..ad25dda85 100755 --- a/src/Api/ApigeeX/Serializer/ApiProductSerializer.php +++ b/src/Api/ApigeeX/Serializer/ApiProductSerializer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Api\ApigeeX\Normalizer\ApiProductNormalizer; use Apigee\Edge\Api\Monetization\Serializer\EntitySerializer; -class ApiProductSerializer extends EntitySerializer +final class ApiProductSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/ApigeeX/Serializer/AppGroupEntitySerializer.php b/src/Api/ApigeeX/Serializer/AppGroupEntitySerializer.php index d04a8d0be..18e321b54 100644 --- a/src/Api/ApigeeX/Serializer/AppGroupEntitySerializer.php +++ b/src/Api/ApigeeX/Serializer/AppGroupEntitySerializer.php @@ -26,7 +26,7 @@ use Apigee\Edge\Normalizer\CredentialProductNormalizer; use Apigee\Edge\Serializer\EntitySerializer; -class AppGroupEntitySerializer extends EntitySerializer +final class AppGroupEntitySerializer extends EntitySerializer { /** * AppGroupEntitySerializer constructor. diff --git a/src/Api/ApigeeX/Serializer/AppGroupMembershipSerializer.php b/src/Api/ApigeeX/Serializer/AppGroupMembershipSerializer.php index b912560e1..fae2bfa74 100644 --- a/src/Api/ApigeeX/Serializer/AppGroupMembershipSerializer.php +++ b/src/Api/ApigeeX/Serializer/AppGroupMembershipSerializer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Api\ApigeeX\Normalizer\AppGroupMembershipNormalizer; use Apigee\Edge\Serializer\EntitySerializer; -class AppGroupMembershipSerializer extends EntitySerializer +final class AppGroupMembershipSerializer extends EntitySerializer { /** * AppGroupMembershipSerializer constructor. diff --git a/src/Api/ApigeeX/Serializer/AppGroupSerializer.php b/src/Api/ApigeeX/Serializer/AppGroupSerializer.php index a4ecd5e8a..c93ec0b60 100644 --- a/src/Api/ApigeeX/Serializer/AppGroupSerializer.php +++ b/src/Api/ApigeeX/Serializer/AppGroupSerializer.php @@ -20,6 +20,6 @@ use Apigee\Edge\Api\Management\Serializer\AttributesPropertyAwareEntitySerializer; -class AppGroupSerializer extends AttributesPropertyAwareEntitySerializer +final class AppGroupSerializer extends AttributesPropertyAwareEntitySerializer { } diff --git a/src/Api/ApigeeX/Serializer/BillingTypeSerializer.php b/src/Api/ApigeeX/Serializer/BillingTypeSerializer.php index 2d095a3ba..a07c92fcd 100644 --- a/src/Api/ApigeeX/Serializer/BillingTypeSerializer.php +++ b/src/Api/ApigeeX/Serializer/BillingTypeSerializer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Api\ApigeeX\Normalizer\BillingTypeNormalizer; use Apigee\Edge\Api\Monetization\Serializer\EntitySerializer; -class BillingTypeSerializer extends EntitySerializer +final class BillingTypeSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/ApigeeX/Serializer/PrepaidBalanceSerializer.php b/src/Api/ApigeeX/Serializer/PrepaidBalanceSerializer.php index b8d793938..08c864ea5 100755 --- a/src/Api/ApigeeX/Serializer/PrepaidBalanceSerializer.php +++ b/src/Api/ApigeeX/Serializer/PrepaidBalanceSerializer.php @@ -23,7 +23,7 @@ use Apigee\Edge\Api\Monetization\Serializer\EntitySerializer; use Apigee\Edge\Api\Monetization\Serializer\SupportedCurrencySerializer; -class PrepaidBalanceSerializer extends EntitySerializer +final class PrepaidBalanceSerializer extends EntitySerializer { /** * {@inheritDoc} diff --git a/src/Api/ApigeeX/Serializer/RatePlanSerializer.php b/src/Api/ApigeeX/Serializer/RatePlanSerializer.php index b0061e62e..260615024 100755 --- a/src/Api/ApigeeX/Serializer/RatePlanSerializer.php +++ b/src/Api/ApigeeX/Serializer/RatePlanSerializer.php @@ -25,7 +25,7 @@ use Apigee\Edge\Api\Monetization\Serializer\EntitySerializer; use Apigee\Edge\Api\Monetization\Serializer\LegalEntitySerializer; -class RatePlanSerializer extends EntitySerializer +final class RatePlanSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Management/Controller/ApiProductController.php b/src/Api/Management/Controller/ApiProductController.php index 24536ab11..b74658cf6 100644 --- a/src/Api/Management/Controller/ApiProductController.php +++ b/src/Api/Management/Controller/ApiProductController.php @@ -33,7 +33,7 @@ /** * Class ApiProductController. */ -class ApiProductController extends PaginatedEntityController implements ApiProductControllerInterface +final class ApiProductController extends PaginatedEntityController implements ApiProductControllerInterface { use AttributesAwareEntityControllerTrait; use EntityCrudOperationsControllerTrait; diff --git a/src/Api/Management/Controller/AppController.php b/src/Api/Management/Controller/AppController.php index f6886b2cd..4a1ae5f46 100644 --- a/src/Api/Management/Controller/AppController.php +++ b/src/Api/Management/Controller/AppController.php @@ -31,7 +31,7 @@ /** * Class AppController. */ -class AppController extends PaginatedEntityController implements AppControllerInterface +final class AppController extends PaginatedEntityController implements AppControllerInterface { use EntityListingControllerTrait; use PaginationHelperTrait { diff --git a/src/Api/Management/Controller/AttributesAwareEntityControllerTrait.php b/src/Api/Management/Controller/AttributesAwareEntityControllerTrait.php index 5f5f3f820..94de485fb 100644 --- a/src/Api/Management/Controller/AttributesAwareEntityControllerTrait.php +++ b/src/Api/Management/Controller/AttributesAwareEntityControllerTrait.php @@ -114,7 +114,7 @@ public function deleteAttribute(string $entityId, string $name): void protected function getEntityAttributesUri(string $entityId): UriInterface { $uri = $this->getEntityEndpointUri($entityId)->withPath( - $this->getEntityEndpointUri($entityId) . '/attributes' + (string) $this->getEntityEndpointUri($entityId) . '/attributes' ); return $uri; @@ -132,7 +132,7 @@ protected function getEntityAttributeUri(string $entityId, string $name): UriInt { $encoded = rawurlencode($name); $uri = $this->getEntityAttributesUri($entityId)->withPath( - $this->getEntityAttributesUri($entityId) . '/' . $encoded + (string) $this->getEntityAttributesUri($entityId) . '/' . $encoded ); return $uri; diff --git a/src/Api/Management/Controller/CompanyAppController.php b/src/Api/Management/Controller/CompanyAppController.php index 6e30fdee6..64a22757c 100644 --- a/src/Api/Management/Controller/CompanyAppController.php +++ b/src/Api/Management/Controller/CompanyAppController.php @@ -27,7 +27,7 @@ /** * Class CompanyAppController. */ -class CompanyAppController extends AppByOwnerController implements CompanyAppControllerInterface +final class CompanyAppController extends AppByOwnerController implements CompanyAppControllerInterface { use CompanyAwareControllerTrait; /** diff --git a/src/Api/Management/Controller/CompanyController.php b/src/Api/Management/Controller/CompanyController.php index 3379fba85..38edd76e5 100644 --- a/src/Api/Management/Controller/CompanyController.php +++ b/src/Api/Management/Controller/CompanyController.php @@ -34,7 +34,7 @@ /** * Class CompanyController. */ -class CompanyController extends PaginatedEntityController implements CompanyControllerInterface +final class CompanyController extends PaginatedEntityController implements CompanyControllerInterface { use AttributesAwareEntityControllerTrait; use EntityCrudOperationsControllerTrait; diff --git a/src/Api/Management/Controller/CompanyMembersController.php b/src/Api/Management/Controller/CompanyMembersController.php index d190f00a5..640bd8fdd 100644 --- a/src/Api/Management/Controller/CompanyMembersController.php +++ b/src/Api/Management/Controller/CompanyMembersController.php @@ -28,7 +28,7 @@ /** * Allows to manage company memberships. */ -class CompanyMembersController extends AbstractController implements CompanyMembersControllerInterface +final class CompanyMembersController extends AbstractController implements CompanyMembersControllerInterface { use CompanyAwareControllerTrait; use OrganizationAwareControllerTrait; diff --git a/src/Api/Management/Controller/DeveloperAppController.php b/src/Api/Management/Controller/DeveloperAppController.php index 9e8b66685..cf14e302b 100644 --- a/src/Api/Management/Controller/DeveloperAppController.php +++ b/src/Api/Management/Controller/DeveloperAppController.php @@ -25,7 +25,7 @@ /** * Class DeveloperAppController. */ -class DeveloperAppController extends AppByOwnerController implements DeveloperAppControllerInterface +final class DeveloperAppController extends AppByOwnerController implements DeveloperAppControllerInterface { /** * @var string Developer email or id. diff --git a/src/Api/Management/Controller/DeveloperAppCredentialController.php b/src/Api/Management/Controller/DeveloperAppCredentialController.php index 57d59dfd0..abce0a79d 100644 --- a/src/Api/Management/Controller/DeveloperAppCredentialController.php +++ b/src/Api/Management/Controller/DeveloperAppCredentialController.php @@ -25,7 +25,7 @@ /** * Class DeveloperAppCredentialController. */ -class DeveloperAppCredentialController extends AppCredentialController implements DeveloperAppCredentialControllerInterface +final class DeveloperAppCredentialController extends AppCredentialController implements DeveloperAppCredentialControllerInterface { /** @var string Developer email or id. */ protected $developerId; diff --git a/src/Api/Management/Controller/DeveloperController.php b/src/Api/Management/Controller/DeveloperController.php index 7c95340dc..108acdda4 100644 --- a/src/Api/Management/Controller/DeveloperController.php +++ b/src/Api/Management/Controller/DeveloperController.php @@ -38,7 +38,7 @@ /** * Class DeveloperController. */ -class DeveloperController extends PaginatedEntityController implements DeveloperControllerInterface +final class DeveloperController extends PaginatedEntityController implements DeveloperControllerInterface { use AttributesAwareEntityControllerTrait; use EntityCrudOperationsControllerTrait; diff --git a/src/Api/Management/Controller/EnvironmentController.php b/src/Api/Management/Controller/EnvironmentController.php index 24fe7c939..c95ff7f29 100644 --- a/src/Api/Management/Controller/EnvironmentController.php +++ b/src/Api/Management/Controller/EnvironmentController.php @@ -30,7 +30,7 @@ /** * Class EnvironmentController. */ -class EnvironmentController extends EntityController implements EnvironmentControllerInterface +final class EnvironmentController extends EntityController implements EnvironmentControllerInterface { use EntityCrudOperationsControllerTrait; use NonPaginatedEntityIdListingControllerTrait; diff --git a/src/Api/Management/Controller/OrganizationController.php b/src/Api/Management/Controller/OrganizationController.php index 8d05f5cf7..cfb540901 100644 --- a/src/Api/Management/Controller/OrganizationController.php +++ b/src/Api/Management/Controller/OrganizationController.php @@ -32,7 +32,7 @@ /** * Class OrganizationController. */ -class OrganizationController extends AbstractEntityController implements OrganizationControllerInterface +final class OrganizationController extends AbstractEntityController implements OrganizationControllerInterface { use EntityCrudOperationsControllerTrait; use EntityListingControllerTrait; diff --git a/src/Api/Management/Controller/StatsController.php b/src/Api/Management/Controller/StatsController.php index 05ca7c0f8..eccc64314 100644 --- a/src/Api/Management/Controller/StatsController.php +++ b/src/Api/Management/Controller/StatsController.php @@ -33,7 +33,7 @@ /** * Class StatsController. */ -class StatsController extends AbstractController implements StatsControllerInterface +final class StatsController extends AbstractController implements StatsControllerInterface { use OrganizationAwareControllerTrait; diff --git a/src/Api/Management/Denormalizer/AppDenormalizer.php b/src/Api/Management/Denormalizer/AppDenormalizer.php index 8d8c95ffe..7e54e7d1e 100644 --- a/src/Api/Management/Denormalizer/AppDenormalizer.php +++ b/src/Api/Management/Denormalizer/AppDenormalizer.php @@ -27,7 +27,7 @@ /** * Dynamically denormalizes apps to developer- or company apps. */ -class AppDenormalizer extends ObjectDenormalizer +final class AppDenormalizer extends ObjectDenormalizer { /** * Fully qualified class name of the developer app entity. @@ -68,6 +68,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return AppInterface::class === $type || $type instanceof AppInterface || in_array(AppInterface::class, class_implements($type)); + return AppInterface::class === $type || $type instanceof AppInterface || in_array(AppInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Management/Denormalizer/CompanyMembershipDenormalizer.php b/src/Api/Management/Denormalizer/CompanyMembershipDenormalizer.php index 828e6d5a5..7198ead1a 100755 --- a/src/Api/Management/Denormalizer/CompanyMembershipDenormalizer.php +++ b/src/Api/Management/Denormalizer/CompanyMembershipDenormalizer.php @@ -24,7 +24,7 @@ /** * Denormalizes company membership data. */ -class CompanyMembershipDenormalizer implements DenormalizerInterface +final class CompanyMembershipDenormalizer implements DenormalizerInterface { /** * {@inheritdoc} diff --git a/src/Api/Management/Entity/ApiProduct.php b/src/Api/Management/Entity/ApiProduct.php index 17c89fb08..a4ac34721 100644 --- a/src/Api/Management/Entity/ApiProduct.php +++ b/src/Api/Management/Entity/ApiProduct.php @@ -32,7 +32,7 @@ /** * Describes an API product entity. */ -class ApiProduct extends Entity implements ApiProductInterface +final class ApiProduct extends Entity implements ApiProductInterface { use AttributesPropertyAwareTrait; use CommonEntityPropertiesAwareTrait; diff --git a/src/Api/Management/Entity/AppCredential.php b/src/Api/Management/Entity/AppCredential.php index 67507179a..32fcc30a6 100644 --- a/src/Api/Management/Entity/AppCredential.php +++ b/src/Api/Management/Entity/AppCredential.php @@ -30,7 +30,7 @@ /** * Class AppCredential. */ -class AppCredential extends Entity implements AppCredentialInterface +final class AppCredential extends Entity implements AppCredentialInterface { use AttributesPropertyAwareTrait; use ScopesPropertyAwareTrait; diff --git a/src/Api/Management/Entity/Company.php b/src/Api/Management/Entity/Company.php index 60c998a70..3cb85b3ee 100644 --- a/src/Api/Management/Entity/Company.php +++ b/src/Api/Management/Entity/Company.php @@ -25,7 +25,7 @@ /** * Describes a Company entity. */ -class Company extends AppOwner implements CompanyInterface +final class Company extends AppOwner implements CompanyInterface { use DisplayNamePropertyAwareTrait; use NamePropertyAwareTrait; diff --git a/src/Api/Management/Entity/CompanyApp.php b/src/Api/Management/Entity/CompanyApp.php index d6fda057b..631bdfec1 100644 --- a/src/Api/Management/Entity/CompanyApp.php +++ b/src/Api/Management/Entity/CompanyApp.php @@ -21,7 +21,7 @@ /** * Class CompanyApp. */ -class CompanyApp extends App implements CompanyAppInterface +final class CompanyApp extends App implements CompanyAppInterface { /** @var string */ protected $companyName; diff --git a/src/Api/Management/Entity/Developer.php b/src/Api/Management/Entity/Developer.php index 13a20817f..715c75422 100644 --- a/src/Api/Management/Entity/Developer.php +++ b/src/Api/Management/Entity/Developer.php @@ -26,7 +26,7 @@ /** * Describes a Developer entity. */ -class Developer extends AppOwner implements DeveloperInterface +final class Developer extends AppOwner implements DeveloperInterface { use DeveloperIdPropertyAwareTrait; use EmailPropertyAwareTrait; diff --git a/src/Api/Management/Entity/DeveloperApp.php b/src/Api/Management/Entity/DeveloperApp.php index 5604b5472..d13b47cb9 100644 --- a/src/Api/Management/Entity/DeveloperApp.php +++ b/src/Api/Management/Entity/DeveloperApp.php @@ -23,7 +23,7 @@ /** * Class DeveloperApp. */ -class DeveloperApp extends App implements DeveloperAppInterface +final class DeveloperApp extends App implements DeveloperAppInterface { use DeveloperIdPropertyAwareTrait; } diff --git a/src/Api/Management/Entity/Environment.php b/src/Api/Management/Entity/Environment.php index 04dd139a6..a31da740a 100644 --- a/src/Api/Management/Entity/Environment.php +++ b/src/Api/Management/Entity/Environment.php @@ -31,7 +31,7 @@ * @TODO * "mdc" property is ignored. */ -class Environment extends Entity implements EnvironmentInterface +final class Environment extends Entity implements EnvironmentInterface { use CommonEntityPropertiesAwareTrait; use NamePropertyAwareTrait; diff --git a/src/Api/Management/Entity/Organization.php b/src/Api/Management/Entity/Organization.php index adcbe7c3b..d6b843c48 100644 --- a/src/Api/Management/Entity/Organization.php +++ b/src/Api/Management/Entity/Organization.php @@ -33,7 +33,7 @@ /** * Describes an Organization entity. */ -class Organization extends Entity implements OrganizationInterface +final class Organization extends Entity implements OrganizationInterface { use DisplayNamePropertyAwareTrait; use CommonEntityPropertiesAwareTrait; diff --git a/src/Api/Management/Exception/DeveloperNotFoundException.php b/src/Api/Management/Exception/DeveloperNotFoundException.php index 80e3c9d72..ed4687fef 100644 --- a/src/Api/Management/Exception/DeveloperNotFoundException.php +++ b/src/Api/Management/Exception/DeveloperNotFoundException.php @@ -23,6 +23,6 @@ /** * Class DeveloperNotFoundException. */ -class DeveloperNotFoundException extends ApiResponseException +final class DeveloperNotFoundException extends ApiResponseException { } diff --git a/src/Api/Management/Normalizer/AppCredentialNormalizer.php b/src/Api/Management/Normalizer/AppCredentialNormalizer.php index 0903c413c..8fdfb8ca6 100644 --- a/src/Api/Management/Normalizer/AppCredentialNormalizer.php +++ b/src/Api/Management/Normalizer/AppCredentialNormalizer.php @@ -25,7 +25,7 @@ /** * Class AppCredentialNormalizer. */ -class AppCredentialNormalizer extends ObjectNormalizer implements NormalizerInterface +final class AppCredentialNormalizer extends ObjectNormalizer implements NormalizerInterface { /** * {@inheritdoc} diff --git a/src/Api/Management/Normalizer/AppNormalizer.php b/src/Api/Management/Normalizer/AppNormalizer.php index 5010f277e..937f12c0e 100644 --- a/src/Api/Management/Normalizer/AppNormalizer.php +++ b/src/Api/Management/Normalizer/AppNormalizer.php @@ -25,7 +25,7 @@ /** * Class AppNormalizer. */ -class AppNormalizer extends ObjectNormalizer implements NormalizerInterface +final class AppNormalizer extends ObjectNormalizer implements NormalizerInterface { /** * {@inheritdoc} diff --git a/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php b/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php index 68065c927..80562e4bc 100644 --- a/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php +++ b/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php @@ -22,7 +22,7 @@ use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class CompanyMembershipNormalizer implements NormalizerInterface +final class CompanyMembershipNormalizer implements NormalizerInterface { /** * {@inheritdoc} diff --git a/src/Api/Management/Query/StatsQuery.php b/src/Api/Management/Query/StatsQuery.php index 8ee912dd1..043623424 100644 --- a/src/Api/Management/Query/StatsQuery.php +++ b/src/Api/Management/Query/StatsQuery.php @@ -23,7 +23,7 @@ /** * Class StatsQuery. */ -class StatsQuery implements StatsQueryInterface +final class StatsQuery implements StatsQueryInterface { public const SORT_ASC = 'ASC'; diff --git a/src/Api/Management/Query/StatsQueryNormalizer.php b/src/Api/Management/Query/StatsQueryNormalizer.php index 532cbf576..c141530ca 100644 --- a/src/Api/Management/Query/StatsQueryNormalizer.php +++ b/src/Api/Management/Query/StatsQueryNormalizer.php @@ -30,7 +30,7 @@ * * Normalizes StatsQueryInterface objects to an array that can be passed to the Stats API as query parameter. */ -class StatsQueryNormalizer implements NormalizerInterface +final class StatsQueryNormalizer implements NormalizerInterface { public const DATE_FORMAT = 'm/d/Y H:i'; diff --git a/src/Api/Management/Serializer/ApiProductSerializer.php b/src/Api/Management/Serializer/ApiProductSerializer.php index 86a97bcb5..3b2858c07 100644 --- a/src/Api/Management/Serializer/ApiProductSerializer.php +++ b/src/Api/Management/Serializer/ApiProductSerializer.php @@ -18,6 +18,6 @@ namespace Apigee\Edge\Api\Management\Serializer; -class ApiProductSerializer extends AttributesPropertyAwareEntitySerializer +final class ApiProductSerializer extends AttributesPropertyAwareEntitySerializer { } diff --git a/src/Api/Management/Serializer/AppCredentialSerializer.php b/src/Api/Management/Serializer/AppCredentialSerializer.php index f80ff8051..6dacc03fe 100644 --- a/src/Api/Management/Serializer/AppCredentialSerializer.php +++ b/src/Api/Management/Serializer/AppCredentialSerializer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Denormalizer\CredentialProductDenormalizer; use Apigee\Edge\Normalizer\CredentialProductNormalizer; -class AppCredentialSerializer extends AttributesPropertyAwareEntitySerializer +final class AppCredentialSerializer extends AttributesPropertyAwareEntitySerializer { /** * AppCredentialSerializer constructor. diff --git a/src/Api/Management/Serializer/AppEntitySerializer.php b/src/Api/Management/Serializer/AppEntitySerializer.php index abc35d8f3..dde164f27 100644 --- a/src/Api/Management/Serializer/AppEntitySerializer.php +++ b/src/Api/Management/Serializer/AppEntitySerializer.php @@ -26,7 +26,7 @@ use Apigee\Edge\Normalizer\CredentialProductNormalizer; use Apigee\Edge\Serializer\EntitySerializer; -class AppEntitySerializer extends EntitySerializer +final class AppEntitySerializer extends EntitySerializer { /** * AppEntitySerializer constructor. diff --git a/src/Api/Management/Serializer/CompanyMembershipSerializer.php b/src/Api/Management/Serializer/CompanyMembershipSerializer.php index f9d298a86..78fe90457 100644 --- a/src/Api/Management/Serializer/CompanyMembershipSerializer.php +++ b/src/Api/Management/Serializer/CompanyMembershipSerializer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Api\Management\Normalizer\CompanyMembershipNormalizer; use Apigee\Edge\Serializer\EntitySerializer; -class CompanyMembershipSerializer extends EntitySerializer +final class CompanyMembershipSerializer extends EntitySerializer { /** * CompanyMembershipSerializer constructor. diff --git a/src/Api/Management/Serializer/CompanySerializer.php b/src/Api/Management/Serializer/CompanySerializer.php index 9a062647b..fe5c3056a 100644 --- a/src/Api/Management/Serializer/CompanySerializer.php +++ b/src/Api/Management/Serializer/CompanySerializer.php @@ -18,6 +18,6 @@ namespace Apigee\Edge\Api\Management\Serializer; -class CompanySerializer extends AttributesPropertyAwareEntitySerializer +final class CompanySerializer extends AttributesPropertyAwareEntitySerializer { } diff --git a/src/Api/Management/Serializer/DeveloperSerializer.php b/src/Api/Management/Serializer/DeveloperSerializer.php index 3d76fa129..731cbcf3d 100644 --- a/src/Api/Management/Serializer/DeveloperSerializer.php +++ b/src/Api/Management/Serializer/DeveloperSerializer.php @@ -18,6 +18,6 @@ namespace Apigee\Edge\Api\Management\Serializer; -class DeveloperSerializer extends AttributesPropertyAwareEntitySerializer +final class DeveloperSerializer extends AttributesPropertyAwareEntitySerializer { } diff --git a/src/Api/Management/Serializer/EnvironmentSerializer.php b/src/Api/Management/Serializer/EnvironmentSerializer.php index 4e117d644..fcd405eef 100644 --- a/src/Api/Management/Serializer/EnvironmentSerializer.php +++ b/src/Api/Management/Serializer/EnvironmentSerializer.php @@ -18,6 +18,6 @@ namespace Apigee\Edge\Api\Management\Serializer; -class EnvironmentSerializer extends PropertiesPropertyAwareEntitySerializer +final class EnvironmentSerializer extends PropertiesPropertyAwareEntitySerializer { } diff --git a/src/Api/Management/Serializer/OrganizationSerializer.php b/src/Api/Management/Serializer/OrganizationSerializer.php index bf81d45fd..78a32ff37 100644 --- a/src/Api/Management/Serializer/OrganizationSerializer.php +++ b/src/Api/Management/Serializer/OrganizationSerializer.php @@ -18,6 +18,6 @@ namespace Apigee\Edge\Api\Management\Serializer; -class OrganizationSerializer extends PropertiesPropertyAwareEntitySerializer +final class OrganizationSerializer extends PropertiesPropertyAwareEntitySerializer { } diff --git a/src/Api/Monetization/Controller/AcceptedRatePlanController.php b/src/Api/Monetization/Controller/AcceptedRatePlanController.php index 0fdc961ab..ce0a26367 100644 --- a/src/Api/Monetization/Controller/AcceptedRatePlanController.php +++ b/src/Api/Monetization/Controller/AcceptedRatePlanController.php @@ -99,7 +99,7 @@ public function acceptRatePlan(RatePlanInterface $ratePlan, DateTimeImmutable $s if (null !== $waveTerminationCharge) { $tmp['waveTerminationCharge'] = $waveTerminationCharge ? 'true' : 'false'; } - $payload = json_encode($tmp); + $payload = (string) json_encode($tmp); $response = $this->client->post($this->getBaseEndpointUri(), $payload); $this->getEntitySerializer()->setPropertiesFromResponse($response, $acceptedRatePlan); @@ -122,7 +122,7 @@ public function updateSubscription(AcceptedRatePlanInterface $acceptedRatePlan, $tmp['waveTerminationCharge'] = $waveTerminationCharge ? 'true' : 'false'; } $this->alterRequestPayload($tmp, $acceptedRatePlan); - $payload = json_encode($tmp); + $payload = (string) json_encode($tmp); // Update an existing entity. $response = $this->client->put($this->getEntityEndpointUri($acceptedRatePlan->id()), $payload); $this->getEntitySerializer()->setPropertiesFromResponse($response, $acceptedRatePlan); diff --git a/src/Api/Monetization/Controller/ApiPackageController.php b/src/Api/Monetization/Controller/ApiPackageController.php index 03044e040..d955b7c14 100644 --- a/src/Api/Monetization/Controller/ApiPackageController.php +++ b/src/Api/Monetization/Controller/ApiPackageController.php @@ -27,7 +27,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class ApiPackageController extends OrganizationAwareEntityController implements ApiPackageControllerInterface +final class ApiPackageController extends OrganizationAwareEntityController implements ApiPackageControllerInterface { use EntityCreateOperationControllerTrait; use EntityDeleteOperationControllerTrait; diff --git a/src/Api/Monetization/Controller/ApiProductController.php b/src/Api/Monetization/Controller/ApiProductController.php index 16a769faf..8245a387d 100644 --- a/src/Api/Monetization/Controller/ApiProductController.php +++ b/src/Api/Monetization/Controller/ApiProductController.php @@ -23,7 +23,7 @@ use Apigee\Edge\Controller\EntityLoadOperationControllerTrait; use Psr\Http\Message\UriInterface; -class ApiProductController extends OrganizationAwareEntityController implements ApiProductControllerInterface +final class ApiProductController extends OrganizationAwareEntityController implements ApiProductControllerInterface { use EntityListingControllerTrait; use EntityLoadOperationControllerTrait; diff --git a/src/Api/Monetization/Controller/CompanyAcceptedRatePlanController.php b/src/Api/Monetization/Controller/CompanyAcceptedRatePlanController.php index 597b0f8c8..d1e9fd74f 100644 --- a/src/Api/Monetization/Controller/CompanyAcceptedRatePlanController.php +++ b/src/Api/Monetization/Controller/CompanyAcceptedRatePlanController.php @@ -24,7 +24,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class CompanyAcceptedRatePlanController extends AcceptedRatePlanController +final class CompanyAcceptedRatePlanController extends AcceptedRatePlanController { /** * Name of the company. diff --git a/src/Api/Monetization/Controller/CompanyActiveRatePlanController.php b/src/Api/Monetization/Controller/CompanyActiveRatePlanController.php index 03e4edb82..6f56c3d6f 100644 --- a/src/Api/Monetization/Controller/CompanyActiveRatePlanController.php +++ b/src/Api/Monetization/Controller/CompanyActiveRatePlanController.php @@ -22,7 +22,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class CompanyActiveRatePlanController extends ActiveRatePlanController +final class CompanyActiveRatePlanController extends ActiveRatePlanController { /** * Name of the company. diff --git a/src/Api/Monetization/Controller/CompanyController.php b/src/Api/Monetization/Controller/CompanyController.php index 721fdf655..8febda14f 100644 --- a/src/Api/Monetization/Controller/CompanyController.php +++ b/src/Api/Monetization/Controller/CompanyController.php @@ -26,7 +26,7 @@ * The endpoint currently returns both developers and companies, this may * change later! */ -class CompanyController extends LegalEntityController implements CompanyControllerInterface +final class CompanyController extends LegalEntityController implements CompanyControllerInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Controller/CompanyPrepaidBalanceController.php b/src/Api/Monetization/Controller/CompanyPrepaidBalanceController.php index 37c66ac29..30ba05b90 100644 --- a/src/Api/Monetization/Controller/CompanyPrepaidBalanceController.php +++ b/src/Api/Monetization/Controller/CompanyPrepaidBalanceController.php @@ -20,7 +20,7 @@ use Psr\Http\Message\UriInterface; -class CompanyPrepaidBalanceController extends PrepaidBalanceController implements CompanyPrepaidBalanceControllerInterface +final class CompanyPrepaidBalanceController extends PrepaidBalanceController implements CompanyPrepaidBalanceControllerInterface { /** * Name of the company. diff --git a/src/Api/Monetization/Controller/CompanyReportDefinitionController.php b/src/Api/Monetization/Controller/CompanyReportDefinitionController.php index fabcd9324..486715dae 100644 --- a/src/Api/Monetization/Controller/CompanyReportDefinitionController.php +++ b/src/Api/Monetization/Controller/CompanyReportDefinitionController.php @@ -23,7 +23,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class CompanyReportDefinitionController extends LegalEntityReportDefinitionController implements CompanyReportDefinitionControllerInterface +final class CompanyReportDefinitionController extends LegalEntityReportDefinitionController implements CompanyReportDefinitionControllerInterface { /** * @var string diff --git a/src/Api/Monetization/Controller/CompanyTermsAndConditionsController.php b/src/Api/Monetization/Controller/CompanyTermsAndConditionsController.php index 50166d477..08d9f828e 100644 --- a/src/Api/Monetization/Controller/CompanyTermsAndConditionsController.php +++ b/src/Api/Monetization/Controller/CompanyTermsAndConditionsController.php @@ -22,7 +22,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class CompanyTermsAndConditionsController extends LegalEntityTermsAndConditionsController +final class CompanyTermsAndConditionsController extends LegalEntityTermsAndConditionsController { /** * Name of the company. diff --git a/src/Api/Monetization/Controller/DeveloperAcceptedRatePlanController.php b/src/Api/Monetization/Controller/DeveloperAcceptedRatePlanController.php index 63c5a5de7..258b9a644 100644 --- a/src/Api/Monetization/Controller/DeveloperAcceptedRatePlanController.php +++ b/src/Api/Monetization/Controller/DeveloperAcceptedRatePlanController.php @@ -25,7 +25,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class DeveloperAcceptedRatePlanController extends AcceptedRatePlanController +final class DeveloperAcceptedRatePlanController extends AcceptedRatePlanController { /** * UUID or email address of a developer. diff --git a/src/Api/Monetization/Controller/DeveloperActiveRatePlanController.php b/src/Api/Monetization/Controller/DeveloperActiveRatePlanController.php index 8fbf45381..b7bd76fdc 100644 --- a/src/Api/Monetization/Controller/DeveloperActiveRatePlanController.php +++ b/src/Api/Monetization/Controller/DeveloperActiveRatePlanController.php @@ -22,7 +22,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class DeveloperActiveRatePlanController extends ActiveRatePlanController +final class DeveloperActiveRatePlanController extends ActiveRatePlanController { /** * UUID or email address of a developer. diff --git a/src/Api/Monetization/Controller/DeveloperController.php b/src/Api/Monetization/Controller/DeveloperController.php index 9754a7952..e5834e645 100644 --- a/src/Api/Monetization/Controller/DeveloperController.php +++ b/src/Api/Monetization/Controller/DeveloperController.php @@ -26,7 +26,7 @@ * The endpoint currently returns both developers and companies, this may * change later! */ -class DeveloperController extends LegalEntityController implements DeveloperControllerInterface +final class DeveloperController extends LegalEntityController implements DeveloperControllerInterface { use PaginatedListingHelperTrait; diff --git a/src/Api/Monetization/Controller/DeveloperPrepaidBalanceController.php b/src/Api/Monetization/Controller/DeveloperPrepaidBalanceController.php index a779428bc..b5be576ec 100644 --- a/src/Api/Monetization/Controller/DeveloperPrepaidBalanceController.php +++ b/src/Api/Monetization/Controller/DeveloperPrepaidBalanceController.php @@ -22,7 +22,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class DeveloperPrepaidBalanceController extends PrepaidBalanceController implements DeveloperPrepaidBalanceControllerInterface +final class DeveloperPrepaidBalanceController extends PrepaidBalanceController implements DeveloperPrepaidBalanceControllerInterface { /** * UUID or email address of a developer. diff --git a/src/Api/Monetization/Controller/DeveloperReportDefinitionController.php b/src/Api/Monetization/Controller/DeveloperReportDefinitionController.php index 25096c5c8..8e086feee 100644 --- a/src/Api/Monetization/Controller/DeveloperReportDefinitionController.php +++ b/src/Api/Monetization/Controller/DeveloperReportDefinitionController.php @@ -23,7 +23,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class DeveloperReportDefinitionController extends LegalEntityReportDefinitionController implements DeveloperReportDefinitionControllerInterface +final class DeveloperReportDefinitionController extends LegalEntityReportDefinitionController implements DeveloperReportDefinitionControllerInterface { /** * @var string diff --git a/src/Api/Monetization/Controller/DeveloperRoleController.php b/src/Api/Monetization/Controller/DeveloperRoleController.php index 554621e8f..306b6f1c2 100644 --- a/src/Api/Monetization/Controller/DeveloperRoleController.php +++ b/src/Api/Monetization/Controller/DeveloperRoleController.php @@ -22,7 +22,7 @@ use Apigee\Edge\Controller\EntityListingControllerTrait; use Psr\Http\Message\UriInterface; -class DeveloperRoleController extends OrganizationAwareEntityController implements DeveloperRoleControllerInterface +final class DeveloperRoleController extends OrganizationAwareEntityController implements DeveloperRoleControllerInterface { use EntityCreateOperationControllerTrait; use EntityListingControllerTrait; diff --git a/src/Api/Monetization/Controller/DeveloperTermsAndConditionsController.php b/src/Api/Monetization/Controller/DeveloperTermsAndConditionsController.php index 98b4b567f..bb3638124 100644 --- a/src/Api/Monetization/Controller/DeveloperTermsAndConditionsController.php +++ b/src/Api/Monetization/Controller/DeveloperTermsAndConditionsController.php @@ -22,7 +22,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class DeveloperTermsAndConditionsController extends LegalEntityTermsAndConditionsController +final class DeveloperTermsAndConditionsController extends LegalEntityTermsAndConditionsController { /** * @var string diff --git a/src/Api/Monetization/Controller/OrganizationProfileController.php b/src/Api/Monetization/Controller/OrganizationProfileController.php index 0ed878881..818dc73c9 100644 --- a/src/Api/Monetization/Controller/OrganizationProfileController.php +++ b/src/Api/Monetization/Controller/OrganizationProfileController.php @@ -27,7 +27,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class OrganizationProfileController extends EntityController implements OrganizationProfileControllerInterface +final class OrganizationProfileController extends EntityController implements OrganizationProfileControllerInterface { use EntityLoadOperationControllerTrait; use EntityUpdateOperationControllerTrait; diff --git a/src/Api/Monetization/Controller/PaymentProviderController.php b/src/Api/Monetization/Controller/PaymentProviderController.php index 782fc148d..c0b655eb6 100644 --- a/src/Api/Monetization/Controller/PaymentProviderController.php +++ b/src/Api/Monetization/Controller/PaymentProviderController.php @@ -22,7 +22,7 @@ use Apigee\Edge\Controller\EntityListingControllerTrait; use Psr\Http\Message\UriInterface; -class PaymentProviderController extends OrganizationAwareEntityController implements PaymentProviderControllerInterface +final class PaymentProviderController extends OrganizationAwareEntityController implements PaymentProviderControllerInterface { use EntityCrudOperationsControllerTrait; use EntityListingControllerAwareTrait; diff --git a/src/Api/Monetization/Controller/RatePlanController.php b/src/Api/Monetization/Controller/RatePlanController.php index 148ab2e3e..17b06f295 100644 --- a/src/Api/Monetization/Controller/RatePlanController.php +++ b/src/Api/Monetization/Controller/RatePlanController.php @@ -28,7 +28,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class RatePlanController extends OrganizationAwareEntityController implements RatePlanControllerInterface +final class RatePlanController extends OrganizationAwareEntityController implements RatePlanControllerInterface { use EntityCrudOperationsControllerTrait { buildEntityCreatePayload as private traitBuildContextForEntityTransformerInCreate; @@ -79,6 +79,9 @@ public function getEntities(?bool $showCurrentOnly = null, ?bool $showPrivate = $responseArray = $this->responseToArray($response); // Ignore entity type key from response, ex.: product. $responseArray = reset($responseArray); + if (!is_array($responseArray)) { + $responseArray = []; + } return $this->responseArrayToArrayOfEntities($responseArray); } @@ -94,7 +97,7 @@ public function getEntities(?bool $showCurrentOnly = null, ?bool $showPrivate = public function createNewRevision(RatePlanRevisionInterface $entity): void { $payload = $this->getEntitySerializer()->serialize($entity, 'json'); - $response = $this->getClient()->post($this->getEntityEndpointUri($entity->getPreviousRatePlanRevision()->id()) . '/revision', $payload); + $response = $this->getClient()->post((string) $this->getEntityEndpointUri($entity->getPreviousRatePlanRevision()->id()) . '/revision', $payload); $this->getEntitySerializer()->setPropertiesFromResponse($response, $entity); } diff --git a/src/Api/Monetization/Controller/ReportDefinitionController.php b/src/Api/Monetization/Controller/ReportDefinitionController.php index 44aa36520..2484fc6a4 100644 --- a/src/Api/Monetization/Controller/ReportDefinitionController.php +++ b/src/Api/Monetization/Controller/ReportDefinitionController.php @@ -28,7 +28,7 @@ use Apigee\Edge\Utility\ResponseToArrayHelper; use Psr\Http\Message\UriInterface; -class ReportDefinitionController extends OrganizationAwareEntityController implements ReportDefinitionControllerInterface +final class ReportDefinitionController extends OrganizationAwareEntityController implements ReportDefinitionControllerInterface { use EntityCrudOperationsControllerTrait; use EntityListingControllerAwareTrait; diff --git a/src/Api/Monetization/Controller/SupportedCurrencyController.php b/src/Api/Monetization/Controller/SupportedCurrencyController.php index 6fe2704e0..432712b2c 100644 --- a/src/Api/Monetization/Controller/SupportedCurrencyController.php +++ b/src/Api/Monetization/Controller/SupportedCurrencyController.php @@ -25,7 +25,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class SupportedCurrencyController extends OrganizationAwareEntityController implements SupportedCurrencyControllerInterface +final class SupportedCurrencyController extends OrganizationAwareEntityController implements SupportedCurrencyControllerInterface { use EntityCrudOperationsControllerTrait; use EntityListingControllerTrait; diff --git a/src/Api/Monetization/Controller/TermsAndConditionsController.php b/src/Api/Monetization/Controller/TermsAndConditionsController.php index 9784b312c..a18cc9ce9 100644 --- a/src/Api/Monetization/Controller/TermsAndConditionsController.php +++ b/src/Api/Monetization/Controller/TermsAndConditionsController.php @@ -25,7 +25,7 @@ use Apigee\Edge\Serializer\EntitySerializerInterface; use Psr\Http\Message\UriInterface; -class TermsAndConditionsController extends OrganizationAwareEntityController implements TermsAndConditionsControllerInterface +final class TermsAndConditionsController extends OrganizationAwareEntityController implements TermsAndConditionsControllerInterface { use EntityCrudOperationsControllerTrait; use EntityListingControllerTrait; diff --git a/src/Api/Monetization/Denormalizer/AcceptedRatePlanDenormalizer.php b/src/Api/Monetization/Denormalizer/AcceptedRatePlanDenormalizer.php index a83b2cd3e..81d872df0 100644 --- a/src/Api/Monetization/Denormalizer/AcceptedRatePlanDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/AcceptedRatePlanDenormalizer.php @@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return AcceptedRatePlanInterface::class === $type || $type instanceof AcceptedRatePlanInterface || in_array(AcceptedRatePlanInterface::class, class_implements($type)); + return AcceptedRatePlanInterface::class === $type || $type instanceof AcceptedRatePlanInterface || in_array(AcceptedRatePlanInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Monetization/Denormalizer/AddressDenormalizer.php b/src/Api/Monetization/Denormalizer/AddressDenormalizer.php index b007a4680..944e7a8f2 100644 --- a/src/Api/Monetization/Denormalizer/AddressDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/AddressDenormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class AddressDenormalizer extends ObjectDenormalizer +final class AddressDenormalizer extends ObjectDenormalizer { /** * AddressDenormalizer constructor. diff --git a/src/Api/Monetization/Denormalizer/ApiPackageDenormalizer.php b/src/Api/Monetization/Denormalizer/ApiPackageDenormalizer.php index 67cc62471..8898e34f5 100644 --- a/src/Api/Monetization/Denormalizer/ApiPackageDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/ApiPackageDenormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class ApiPackageDenormalizer extends ObjectDenormalizer +final class ApiPackageDenormalizer extends ObjectDenormalizer { /** * ApiPackageDenormalizer constructor. @@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return ApiPackageInterface::class === $type || $type instanceof ApiPackageInterface || in_array(ApiPackageInterface::class, class_implements($type)); + return ApiPackageInterface::class === $type || $type instanceof ApiPackageInterface || in_array(ApiPackageInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Monetization/Denormalizer/BalanceDenormalizer.php b/src/Api/Monetization/Denormalizer/BalanceDenormalizer.php index 1f366af61..de68c196c 100644 --- a/src/Api/Monetization/Denormalizer/BalanceDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/BalanceDenormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class BalanceDenormalizer extends ObjectDenormalizer +final class BalanceDenormalizer extends ObjectDenormalizer { /** * BalanceDenormalizer constructor. @@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return BalanceInterface::class === $type || $type instanceof BalanceInterface || in_array(BalanceInterface::class, class_implements($type)); + return BalanceInterface::class === $type || $type instanceof BalanceInterface || in_array(BalanceInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Monetization/Denormalizer/CompanyAcceptedRatePlanDenormalizer.php b/src/Api/Monetization/Denormalizer/CompanyAcceptedRatePlanDenormalizer.php index b0a1b5060..296b68bf0 100644 --- a/src/Api/Monetization/Denormalizer/CompanyAcceptedRatePlanDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/CompanyAcceptedRatePlanDenormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class CompanyAcceptedRatePlanDenormalizer extends AcceptedRatePlanDenormalizer +final class CompanyAcceptedRatePlanDenormalizer extends AcceptedRatePlanDenormalizer { /** * Fully qualified class name of the company accepted rate plan entity. diff --git a/src/Api/Monetization/Denormalizer/CompanyPaymentTransactionDenormalizer.php b/src/Api/Monetization/Denormalizer/CompanyPaymentTransactionDenormalizer.php index 03f544616..5577ec2ae 100644 --- a/src/Api/Monetization/Denormalizer/CompanyPaymentTransactionDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/CompanyPaymentTransactionDenormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class CompanyPaymentTransactionDenormalizer extends PaymentTransactionDenormalizer +final class CompanyPaymentTransactionDenormalizer extends PaymentTransactionDenormalizer { /** * Fully qualified class name of the company payment transaction object. diff --git a/src/Api/Monetization/Denormalizer/CompanyRatePlanDenormalizer.php b/src/Api/Monetization/Denormalizer/CompanyRatePlanDenormalizer.php index 2f624b8a6..a1ae99813 100644 --- a/src/Api/Monetization/Denormalizer/CompanyRatePlanDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/CompanyRatePlanDenormalizer.php @@ -23,7 +23,7 @@ use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; use Apigee\Edge\Api\Monetization\NameConverter\CompanyRatePlanNameConverter; -class CompanyRatePlanDenormalizer extends RatePlanDenormalizer +final class CompanyRatePlanDenormalizer extends RatePlanDenormalizer { /** * Fully qualified class name of the company rate plan entity. diff --git a/src/Api/Monetization/Denormalizer/CompanyReportDefinitionDenormalizer.php b/src/Api/Monetization/Denormalizer/CompanyReportDefinitionDenormalizer.php index 691f7519a..a1c1fe990 100644 --- a/src/Api/Monetization/Denormalizer/CompanyReportDefinitionDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/CompanyReportDefinitionDenormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class CompanyReportDefinitionDenormalizer extends ReportDefinitionDenormalizer +final class CompanyReportDefinitionDenormalizer extends ReportDefinitionDenormalizer { /** * Fully qualified class name of the company report definition entity. diff --git a/src/Api/Monetization/Denormalizer/DateTimeZoneDenormalizer.php b/src/Api/Monetization/Denormalizer/DateTimeZoneDenormalizer.php index 049c807a7..dfeb697df 100644 --- a/src/Api/Monetization/Denormalizer/DateTimeZoneDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/DateTimeZoneDenormalizer.php @@ -23,7 +23,7 @@ use Symfony\Component\Serializer\Exception\UnexpectedValueException; use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; -class DateTimeZoneDenormalizer implements DenormalizerInterface +final class DateTimeZoneDenormalizer implements DenormalizerInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Denormalizer/DeveloperAcceptedRatePlanDenormalizer.php b/src/Api/Monetization/Denormalizer/DeveloperAcceptedRatePlanDenormalizer.php index 186a4e84c..4ac2d9bfb 100644 --- a/src/Api/Monetization/Denormalizer/DeveloperAcceptedRatePlanDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/DeveloperAcceptedRatePlanDenormalizer.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperAcceptedRatePlan; -class DeveloperAcceptedRatePlanDenormalizer extends AcceptedRatePlanDenormalizer +final class DeveloperAcceptedRatePlanDenormalizer extends AcceptedRatePlanDenormalizer { /** * Fully qualified class name of the developer accepted rate plan entity. diff --git a/src/Api/Monetization/Denormalizer/DeveloperCategoryRatePlanDenormalizer.php b/src/Api/Monetization/Denormalizer/DeveloperCategoryRatePlanDenormalizer.php index a6214ad1c..a7b59e84f 100644 --- a/src/Api/Monetization/Denormalizer/DeveloperCategoryRatePlanDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/DeveloperCategoryRatePlanDenormalizer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperCategoryRatePlanRevision; use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; -class DeveloperCategoryRatePlanDenormalizer extends RatePlanDenormalizer +final class DeveloperCategoryRatePlanDenormalizer extends RatePlanDenormalizer { /** * Fully qualified class name of the developer category rate plan entity. diff --git a/src/Api/Monetization/Denormalizer/DeveloperPaymentTransactionDenormalizer.php b/src/Api/Monetization/Denormalizer/DeveloperPaymentTransactionDenormalizer.php index e0bdcb5a3..0316a6e70 100644 --- a/src/Api/Monetization/Denormalizer/DeveloperPaymentTransactionDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/DeveloperPaymentTransactionDenormalizer.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\Monetization\Structure\DeveloperPaymentTransaction; -class DeveloperPaymentTransactionDenormalizer extends PaymentTransactionDenormalizer +final class DeveloperPaymentTransactionDenormalizer extends PaymentTransactionDenormalizer { /** * Fully qualified class name of the developer payment transaction object. diff --git a/src/Api/Monetization/Denormalizer/DeveloperRatePlanDenormalizer.php b/src/Api/Monetization/Denormalizer/DeveloperRatePlanDenormalizer.php index 2607fb88f..a7b298991 100644 --- a/src/Api/Monetization/Denormalizer/DeveloperRatePlanDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/DeveloperRatePlanDenormalizer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperRatePlanRevision; use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; -class DeveloperRatePlanDenormalizer extends RatePlanDenormalizer +final class DeveloperRatePlanDenormalizer extends RatePlanDenormalizer { /** * Fully qualified class name of the developer rate plan entity. diff --git a/src/Api/Monetization/Denormalizer/DeveloperReportDefinitionDenormalizer.php b/src/Api/Monetization/Denormalizer/DeveloperReportDefinitionDenormalizer.php index dc039b496..6daf41127 100644 --- a/src/Api/Monetization/Denormalizer/DeveloperReportDefinitionDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/DeveloperReportDefinitionDenormalizer.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperReportDefinition; -class DeveloperReportDefinitionDenormalizer extends ReportDefinitionDenormalizer +final class DeveloperReportDefinitionDenormalizer extends ReportDefinitionDenormalizer { /** * Fully qualified class name of the developer report definition entity. diff --git a/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php b/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php index b547b8259..59be70b31 100644 --- a/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php @@ -31,7 +31,7 @@ /** * Dynamically denormalizes legal entities to developers or companies. */ -class LegalEntityDenormalizer extends ObjectDenormalizer +final class LegalEntityDenormalizer extends ObjectDenormalizer { /** * Fully qualified class name of the developer entity. @@ -83,6 +83,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return LegalEntityInterface::class === $type || $type instanceof LegalEntityInterface || in_array(LegalEntityInterface::class, class_implements($type)); + return LegalEntityInterface::class === $type || $type instanceof LegalEntityInterface || in_array(LegalEntityInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Monetization/Denormalizer/OrganizationProfileDenormalizer.php b/src/Api/Monetization/Denormalizer/OrganizationProfileDenormalizer.php index 0bfc90663..e1101e0da 100644 --- a/src/Api/Monetization/Denormalizer/OrganizationProfileDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/OrganizationProfileDenormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class OrganizationProfileDenormalizer extends ObjectDenormalizer +final class OrganizationProfileDenormalizer extends ObjectDenormalizer { /** * OrganizationProfileDenormalizer constructor. @@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return OrganizationProfileInterface::class === $type || $type instanceof OrganizationProfileInterface || in_array(OrganizationProfileInterface::class, class_implements($type)); + return OrganizationProfileInterface::class === $type || $type instanceof OrganizationProfileInterface || in_array(OrganizationProfileInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Monetization/Denormalizer/PrepaidBalanceDenormalizer.php b/src/Api/Monetization/Denormalizer/PrepaidBalanceDenormalizer.php index 9c85a26cb..27c13b8bb 100644 --- a/src/Api/Monetization/Denormalizer/PrepaidBalanceDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/PrepaidBalanceDenormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class PrepaidBalanceDenormalizer extends ObjectDenormalizer +final class PrepaidBalanceDenormalizer extends ObjectDenormalizer { /** * PrepaidBalanceDenormalizer constructor. @@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return PrepaidBalanceInterface::class === $type || $type instanceof PrepaidBalanceInterface || in_array(PrepaidBalanceInterface::class, class_implements($type)); + return PrepaidBalanceInterface::class === $type || $type instanceof PrepaidBalanceInterface || in_array(PrepaidBalanceInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Monetization/Denormalizer/RatePlanDenormalizer.php b/src/Api/Monetization/Denormalizer/RatePlanDenormalizer.php index 0e570503e..f8aaace18 100644 --- a/src/Api/Monetization/Denormalizer/RatePlanDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/RatePlanDenormalizer.php @@ -74,6 +74,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type)); + return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php b/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php index b425f999c..18fa7a6a8 100644 --- a/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php +++ b/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php @@ -23,7 +23,7 @@ use Symfony\Component\Serializer\SerializerAwareTrait; use Symfony\Component\Serializer\SerializerInterface; -class RatePlanDenormalizerFactory implements DenormalizerInterface, SerializerAwareInterface +final class RatePlanDenormalizerFactory implements DenormalizerInterface, SerializerAwareInterface { use SerializerAwareTrait { setSerializer as private traitSetSerializer; diff --git a/src/Api/Monetization/Denormalizer/RatePlanRateDenormalizer.php b/src/Api/Monetization/Denormalizer/RatePlanRateDenormalizer.php index 5030afa47..8fc2614a6 100644 --- a/src/Api/Monetization/Denormalizer/RatePlanRateDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/RatePlanRateDenormalizer.php @@ -24,7 +24,7 @@ use Apigee\Edge\Denormalizer\ObjectDenormalizer; use Symfony\Component\Serializer\Exception\UnexpectedValueException; -class RatePlanRateDenormalizer extends ObjectDenormalizer +final class RatePlanRateDenormalizer extends ObjectDenormalizer { protected $revShareClass = RatePlanRateRevShare::class; diff --git a/src/Api/Monetization/Denormalizer/ReportCriteriaDenormalizer.php b/src/Api/Monetization/Denormalizer/ReportCriteriaDenormalizer.php index f28fea51c..0d0bc0d4e 100644 --- a/src/Api/Monetization/Denormalizer/ReportCriteriaDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/ReportCriteriaDenormalizer.php @@ -33,7 +33,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class ReportCriteriaDenormalizer extends ObjectDenormalizer +final class ReportCriteriaDenormalizer extends ObjectDenormalizer { use TimezoneFixerHelperTrait; /** diff --git a/src/Api/Monetization/Denormalizer/ReportDefinitionDenormalizer.php b/src/Api/Monetization/Denormalizer/ReportDefinitionDenormalizer.php index a37f8cc9b..1c9e97088 100644 --- a/src/Api/Monetization/Denormalizer/ReportDefinitionDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/ReportDefinitionDenormalizer.php @@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return ReportDefinitionInterface::class === $type || $type instanceof ReportDefinitionInterface || in_array(ReportDefinitionInterface::class, class_implements($type)); + return ReportDefinitionInterface::class === $type || $type instanceof ReportDefinitionInterface || in_array(ReportDefinitionInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Monetization/Denormalizer/StandardRatePlanDenormalizer.php b/src/Api/Monetization/Denormalizer/StandardRatePlanDenormalizer.php index 44ebdb87c..7420c2856 100644 --- a/src/Api/Monetization/Denormalizer/StandardRatePlanDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/StandardRatePlanDenormalizer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Api\Monetization\Entity\StandardRatePlan; use Apigee\Edge\Api\Monetization\Entity\StandardRatePlanRevision; -class StandardRatePlanDenormalizer extends RatePlanDenormalizer +final class StandardRatePlanDenormalizer extends RatePlanDenormalizer { /** * Fully qualified class name of the standard rate plan entity. diff --git a/src/Api/Monetization/Denormalizer/SupportedCurrencyDenormalizer.php b/src/Api/Monetization/Denormalizer/SupportedCurrencyDenormalizer.php index 37e7f2eb7..9526fd5f0 100644 --- a/src/Api/Monetization/Denormalizer/SupportedCurrencyDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/SupportedCurrencyDenormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class SupportedCurrencyDenormalizer extends ObjectDenormalizer +final class SupportedCurrencyDenormalizer extends ObjectDenormalizer { /** * SupportedCurrencyDenormalizer constructor. @@ -52,6 +52,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return SupportedCurrencyInterface::class === $type || $type instanceof SupportedCurrencyInterface || in_array(SupportedCurrencyInterface::class, class_implements($type)); + return SupportedCurrencyInterface::class === $type || $type instanceof SupportedCurrencyInterface || in_array(SupportedCurrencyInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Monetization/Denormalizer/TermsAndConditionsDenormalizer.php b/src/Api/Monetization/Denormalizer/TermsAndConditionsDenormalizer.php index 61efbe651..6520d8564 100644 --- a/src/Api/Monetization/Denormalizer/TermsAndConditionsDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/TermsAndConditionsDenormalizer.php @@ -27,7 +27,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class TermsAndConditionsDenormalizer extends ObjectDenormalizer +final class TermsAndConditionsDenormalizer extends ObjectDenormalizer { use TimezoneFixerHelperTrait; @@ -71,6 +71,6 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return TermsAndConditionsInterface::class === $type || $type instanceof TermsAndConditionsInterface || in_array(TermsAndConditionsInterface::class, class_implements($type)); + return TermsAndConditionsInterface::class === $type || $type instanceof TermsAndConditionsInterface || in_array(TermsAndConditionsInterface::class, class_implements($type) ?: []); } } diff --git a/src/Api/Monetization/Entity/ApiPackage.php b/src/Api/Monetization/Entity/ApiPackage.php index d607695a0..7475d7ccc 100644 --- a/src/Api/Monetization/Entity/ApiPackage.php +++ b/src/Api/Monetization/Entity/ApiPackage.php @@ -24,7 +24,7 @@ use Apigee\Edge\Entity\Property\NamePropertyAwareTrait; use Apigee\Edge\Entity\Property\StatusPropertyAwareTrait; -class ApiPackage extends OrganizationAwareEntity implements ApiPackageInterface +final class ApiPackage extends OrganizationAwareEntity implements ApiPackageInterface { use ApiProductsPropertyAwareTrait; use DescriptionPropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/ApiProduct.php b/src/Api/Monetization/Entity/ApiProduct.php index 45fe328a9..b59805bf7 100644 --- a/src/Api/Monetization/Entity/ApiProduct.php +++ b/src/Api/Monetization/Entity/ApiProduct.php @@ -23,7 +23,7 @@ use Apigee\Edge\Entity\Property\NamePropertyAwareTrait; use Apigee\Edge\Entity\Property\StatusPropertyAwareTrait; -class ApiProduct extends OrganizationAwareEntity implements ApiProductInterface +final class ApiProduct extends OrganizationAwareEntity implements ApiProductInterface { use DescriptionPropertyAwareTrait; use DisplayNamePropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/Balance.php b/src/Api/Monetization/Entity/Balance.php index 2bc272194..417d1da7d 100644 --- a/src/Api/Monetization/Entity/Balance.php +++ b/src/Api/Monetization/Entity/Balance.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\Property\CurrencyPropertyAwareTrait; use Apigee\Edge\Api\Monetization\Structure\PaymentTransaction; -class Balance extends Entity implements BalanceInterface +final class Balance extends Entity implements BalanceInterface { use CurrencyPropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/Company.php b/src/Api/Monetization/Entity/Company.php index 1c6b06df4..e2c778dd9 100644 --- a/src/Api/Monetization/Entity/Company.php +++ b/src/Api/Monetization/Entity/Company.php @@ -18,6 +18,6 @@ namespace Apigee\Edge\Api\Monetization\Entity; -class Company extends LegalEntity implements CompanyInterface +final class Company extends LegalEntity implements CompanyInterface { } diff --git a/src/Api/Monetization/Entity/CompanyAcceptedRatePlan.php b/src/Api/Monetization/Entity/CompanyAcceptedRatePlan.php index e6d3deed1..6bfe22ef7 100644 --- a/src/Api/Monetization/Entity/CompanyAcceptedRatePlan.php +++ b/src/Api/Monetization/Entity/CompanyAcceptedRatePlan.php @@ -23,7 +23,7 @@ /** * Represents an accepted rate plan by a company. */ -class CompanyAcceptedRatePlan extends AcceptedRatePlan implements CompanyAcceptedRatePlanInterface +final class CompanyAcceptedRatePlan extends AcceptedRatePlan implements CompanyAcceptedRatePlanInterface { use CompanyPropertyAwareTrait; } diff --git a/src/Api/Monetization/Entity/CompanyRatePlanRevision.php b/src/Api/Monetization/Entity/CompanyRatePlanRevision.php index 74bd95d48..4d598ac2a 100644 --- a/src/Api/Monetization/Entity/CompanyRatePlanRevision.php +++ b/src/Api/Monetization/Entity/CompanyRatePlanRevision.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\Property\KeepOriginalStartDatePropertyAwareTrait; use Apigee\Edge\Api\Monetization\Entity\Property\PreviousRatePlanRevisionPropertyAwareTrait; -class CompanyRatePlanRevision extends CompanyRatePlan implements RatePlanRevisionInterface +final class CompanyRatePlanRevision extends CompanyRatePlan implements RatePlanRevisionInterface { use KeepOriginalStartDatePropertyAwareTrait; use PreviousRatePlanRevisionPropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/CompanyReportDefinition.php b/src/Api/Monetization/Entity/CompanyReportDefinition.php index df4dde554..1ab398ee3 100644 --- a/src/Api/Monetization/Entity/CompanyReportDefinition.php +++ b/src/Api/Monetization/Entity/CompanyReportDefinition.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\Property\CompanyPropertyAwareTrait; -class CompanyReportDefinition extends ReportDefinition implements CompanyReportDefinitionInterface +final class CompanyReportDefinition extends ReportDefinition implements CompanyReportDefinitionInterface { use CompanyPropertyAwareTrait; } diff --git a/src/Api/Monetization/Entity/Developer.php b/src/Api/Monetization/Entity/Developer.php index 7153835bd..1090bf0ca 100644 --- a/src/Api/Monetization/Entity/Developer.php +++ b/src/Api/Monetization/Entity/Developer.php @@ -18,7 +18,7 @@ namespace Apigee\Edge\Api\Monetization\Entity; -class Developer extends LegalEntity implements DeveloperInterface +final class Developer extends LegalEntity implements DeveloperInterface { /** * Value of "parent" from the API response. diff --git a/src/Api/Monetization/Entity/DeveloperAcceptedRatePlan.php b/src/Api/Monetization/Entity/DeveloperAcceptedRatePlan.php index 80ebc5202..018c641fa 100644 --- a/src/Api/Monetization/Entity/DeveloperAcceptedRatePlan.php +++ b/src/Api/Monetization/Entity/DeveloperAcceptedRatePlan.php @@ -23,7 +23,7 @@ /** * Represents an accepted rate plan by a developer. */ -class DeveloperAcceptedRatePlan extends AcceptedRatePlan implements DeveloperAcceptedRatePlanInterface +final class DeveloperAcceptedRatePlan extends AcceptedRatePlan implements DeveloperAcceptedRatePlanInterface { use DeveloperPropertyAwareTrait; } diff --git a/src/Api/Monetization/Entity/DeveloperCategory.php b/src/Api/Monetization/Entity/DeveloperCategory.php index 3cd45fd26..3e2da239c 100644 --- a/src/Api/Monetization/Entity/DeveloperCategory.php +++ b/src/Api/Monetization/Entity/DeveloperCategory.php @@ -21,7 +21,7 @@ use Apigee\Edge\Entity\Property\DescriptionPropertyAwareTrait; use Apigee\Edge\Entity\Property\NamePropertyAwareTrait; -class DeveloperCategory extends Entity implements DeveloperCategoryInterface +final class DeveloperCategory extends Entity implements DeveloperCategoryInterface { use DescriptionPropertyAwareTrait; use NamePropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/DeveloperCategoryRatePlanRevision.php b/src/Api/Monetization/Entity/DeveloperCategoryRatePlanRevision.php index 7e7906544..dd2fd8aea 100644 --- a/src/Api/Monetization/Entity/DeveloperCategoryRatePlanRevision.php +++ b/src/Api/Monetization/Entity/DeveloperCategoryRatePlanRevision.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\Property\KeepOriginalStartDatePropertyAwareTrait; use Apigee\Edge\Api\Monetization\Entity\Property\PreviousRatePlanRevisionPropertyAwareTrait; -class DeveloperCategoryRatePlanRevision extends DeveloperCategoryRatePlan implements RatePlanRevisionInterface +final class DeveloperCategoryRatePlanRevision extends DeveloperCategoryRatePlan implements RatePlanRevisionInterface { use KeepOriginalStartDatePropertyAwareTrait; use PreviousRatePlanRevisionPropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/DeveloperRatePlanRevision.php b/src/Api/Monetization/Entity/DeveloperRatePlanRevision.php index 22f793721..f2ed56620 100644 --- a/src/Api/Monetization/Entity/DeveloperRatePlanRevision.php +++ b/src/Api/Monetization/Entity/DeveloperRatePlanRevision.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\Property\KeepOriginalStartDatePropertyAwareTrait; use Apigee\Edge\Api\Monetization\Entity\Property\PreviousRatePlanRevisionPropertyAwareTrait; -class DeveloperRatePlanRevision extends DeveloperRatePlan implements RatePlanRevisionInterface +final class DeveloperRatePlanRevision extends DeveloperRatePlan implements RatePlanRevisionInterface { use KeepOriginalStartDatePropertyAwareTrait; use PreviousRatePlanRevisionPropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/DeveloperReportDefinition.php b/src/Api/Monetization/Entity/DeveloperReportDefinition.php index 031517eb2..51f6862be 100644 --- a/src/Api/Monetization/Entity/DeveloperReportDefinition.php +++ b/src/Api/Monetization/Entity/DeveloperReportDefinition.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\Property\DeveloperPropertyAwareTrait; -class DeveloperReportDefinition extends ReportDefinition implements DeveloperReportDefinitionInterface +final class DeveloperReportDefinition extends ReportDefinition implements DeveloperReportDefinitionInterface { use DeveloperPropertyAwareTrait; } diff --git a/src/Api/Monetization/Entity/DeveloperRole.php b/src/Api/Monetization/Entity/DeveloperRole.php index 8ae3b4072..294bfb015 100644 --- a/src/Api/Monetization/Entity/DeveloperRole.php +++ b/src/Api/Monetization/Entity/DeveloperRole.php @@ -21,7 +21,7 @@ use Apigee\Edge\Entity\Property\DescriptionPropertyAwareTrait; use Apigee\Edge\Entity\Property\NamePropertyAwareTrait; -class DeveloperRole extends OrganizationAwareEntity implements DeveloperRoleInterface +final class DeveloperRole extends OrganizationAwareEntity implements DeveloperRoleInterface { use DescriptionPropertyAwareTrait; use NamePropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/OrganizationProfile.php b/src/Api/Monetization/Entity/OrganizationProfile.php index 2b10de63e..ac76f9f8d 100644 --- a/src/Api/Monetization/Entity/OrganizationProfile.php +++ b/src/Api/Monetization/Entity/OrganizationProfile.php @@ -26,7 +26,7 @@ use Apigee\Edge\Entity\Property\StatusPropertyAwareTrait; use DateTimeZone; -class OrganizationProfile extends Entity implements OrganizationProfileInterface +final class OrganizationProfile extends Entity implements OrganizationProfileInterface { use AddressesPropertyAwareTrait; use BrokerPropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/PaymentProvider.php b/src/Api/Monetization/Entity/PaymentProvider.php index ac8fa8585..e68214e2d 100644 --- a/src/Api/Monetization/Entity/PaymentProvider.php +++ b/src/Api/Monetization/Entity/PaymentProvider.php @@ -21,7 +21,7 @@ use Apigee\Edge\Entity\Property\DescriptionPropertyAwareTrait; use Apigee\Edge\Entity\Property\NamePropertyAwareTrait; -class PaymentProvider extends Entity implements PaymentProviderInterface +final class PaymentProvider extends Entity implements PaymentProviderInterface { use DescriptionPropertyAwareTrait; use NamePropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/PrepaidBalance.php b/src/Api/Monetization/Entity/PrepaidBalance.php index 44fe41e94..37a04ba53 100644 --- a/src/Api/Monetization/Entity/PrepaidBalance.php +++ b/src/Api/Monetization/Entity/PrepaidBalance.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\Property\CurrencyPropertyAwareTrait; -class PrepaidBalance extends Entity implements PrepaidBalanceInterface +final class PrepaidBalance extends Entity implements PrepaidBalanceInterface { use CurrencyPropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/StandardRatePlanRevision.php b/src/Api/Monetization/Entity/StandardRatePlanRevision.php index 94961ee79..9dcf16b16 100644 --- a/src/Api/Monetization/Entity/StandardRatePlanRevision.php +++ b/src/Api/Monetization/Entity/StandardRatePlanRevision.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\Property\KeepOriginalStartDatePropertyAwareTrait; use Apigee\Edge\Api\Monetization\Entity\Property\PreviousRatePlanRevisionPropertyAwareTrait; -class StandardRatePlanRevision extends StandardRatePlan implements RatePlanRevisionInterface +final class StandardRatePlanRevision extends StandardRatePlan implements RatePlanRevisionInterface { use KeepOriginalStartDatePropertyAwareTrait; use PreviousRatePlanRevisionPropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/SupportedCurrency.php b/src/Api/Monetization/Entity/SupportedCurrency.php index 9959821bb..521763431 100644 --- a/src/Api/Monetization/Entity/SupportedCurrency.php +++ b/src/Api/Monetization/Entity/SupportedCurrency.php @@ -24,7 +24,7 @@ use Apigee\Edge\Entity\Property\NamePropertyAwareTrait; use Apigee\Edge\Entity\Property\StatusPropertyAwareTrait; -class SupportedCurrency extends OrganizationAwareEntity implements SupportedCurrencyInterface +final class SupportedCurrency extends OrganizationAwareEntity implements SupportedCurrencyInterface { use DescriptionPropertyAwareTrait; use DisplayNamePropertyAwareTrait; diff --git a/src/Api/Monetization/Entity/TermsAndConditions.php b/src/Api/Monetization/Entity/TermsAndConditions.php index f7f1ea4d2..02c73647a 100644 --- a/src/Api/Monetization/Entity/TermsAndConditions.php +++ b/src/Api/Monetization/Entity/TermsAndConditions.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\Property\StartDatePropertyAwareTrait; use Apigee\Edge\Entity\Property\DescriptionPropertyAwareTrait; -class TermsAndConditions extends OrganizationAwareEntity implements TermsAndConditionsInterface +final class TermsAndConditions extends OrganizationAwareEntity implements TermsAndConditionsInterface { use DescriptionPropertyAwareTrait; use StartDatePropertyAwareTrait; diff --git a/src/Api/Monetization/NameConverter/AddressNameConverter.php b/src/Api/Monetization/NameConverter/AddressNameConverter.php index 6b1a7b135..a075ba3a5 100644 --- a/src/Api/Monetization/NameConverter/AddressNameConverter.php +++ b/src/Api/Monetization/NameConverter/AddressNameConverter.php @@ -20,7 +20,7 @@ use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class AddressNameConverter extends NameConverterBase implements NameConverterInterface +final class AddressNameConverter extends NameConverterBase implements NameConverterInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/ApiPackageNameConverter.php b/src/Api/Monetization/NameConverter/ApiPackageNameConverter.php index da5484477..2bb23ad27 100644 --- a/src/Api/Monetization/NameConverter/ApiPackageNameConverter.php +++ b/src/Api/Monetization/NameConverter/ApiPackageNameConverter.php @@ -29,7 +29,7 @@ * * @see \Apigee\Edge\Api\Monetization\Entity\ApiPackage */ -class ApiPackageNameConverter extends NameConverterBase implements NameConverterInterface +final class ApiPackageNameConverter extends NameConverterBase implements NameConverterInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/BalanceNameConverter.php b/src/Api/Monetization/NameConverter/BalanceNameConverter.php index 4b8f4b57d..70bd4fb28 100644 --- a/src/Api/Monetization/NameConverter/BalanceNameConverter.php +++ b/src/Api/Monetization/NameConverter/BalanceNameConverter.php @@ -20,7 +20,7 @@ use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class BalanceNameConverter extends NameConverterBase implements NameConverterInterface +final class BalanceNameConverter extends NameConverterBase implements NameConverterInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/CompanyAcceptedRatePlanNameConverter.php b/src/Api/Monetization/NameConverter/CompanyAcceptedRatePlanNameConverter.php index 9e08b3a9e..4bca0a4a4 100644 --- a/src/Api/Monetization/NameConverter/CompanyAcceptedRatePlanNameConverter.php +++ b/src/Api/Monetization/NameConverter/CompanyAcceptedRatePlanNameConverter.php @@ -27,7 +27,7 @@ * * @see \Apigee\Edge\Api\Monetization\Entity\CompanyAcceptedRatePlan */ -class CompanyAcceptedRatePlanNameConverter extends NameConverterBase implements NameConverterInterface +final class CompanyAcceptedRatePlanNameConverter extends NameConverterBase implements NameConverterInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/CompanyPaymentTransactionNameConverter.php b/src/Api/Monetization/NameConverter/CompanyPaymentTransactionNameConverter.php index 9072b43c1..305854ae9 100644 --- a/src/Api/Monetization/NameConverter/CompanyPaymentTransactionNameConverter.php +++ b/src/Api/Monetization/NameConverter/CompanyPaymentTransactionNameConverter.php @@ -18,7 +18,7 @@ namespace Apigee\Edge\Api\Monetization\NameConverter; -class CompanyPaymentTransactionNameConverter extends PaymentTransactionNameConverter +final class CompanyPaymentTransactionNameConverter extends PaymentTransactionNameConverter { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/CompanyRatePlanNameConverter.php b/src/Api/Monetization/NameConverter/CompanyRatePlanNameConverter.php index 21a203fea..40c86532b 100644 --- a/src/Api/Monetization/NameConverter/CompanyRatePlanNameConverter.php +++ b/src/Api/Monetization/NameConverter/CompanyRatePlanNameConverter.php @@ -20,7 +20,7 @@ use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class CompanyRatePlanNameConverter extends RatePlanNameConverter implements NameConverterInterface +final class CompanyRatePlanNameConverter extends RatePlanNameConverter implements NameConverterInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/CompanyReportDefinitionNameConverter.php b/src/Api/Monetization/NameConverter/CompanyReportDefinitionNameConverter.php index 88c9a7786..e9c8d0243 100644 --- a/src/Api/Monetization/NameConverter/CompanyReportDefinitionNameConverter.php +++ b/src/Api/Monetization/NameConverter/CompanyReportDefinitionNameConverter.php @@ -24,7 +24,7 @@ * * @see \Apigee\Edge\Api\Monetization\Entity\CompanyReportDefinition */ -class CompanyReportDefinitionNameConverter extends ReportDefinitionNameConverter +final class CompanyReportDefinitionNameConverter extends ReportDefinitionNameConverter { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/LegalEntityNameConvert.php b/src/Api/Monetization/NameConverter/LegalEntityNameConvert.php index 274574e21..4e079dd21 100644 --- a/src/Api/Monetization/NameConverter/LegalEntityNameConvert.php +++ b/src/Api/Monetization/NameConverter/LegalEntityNameConvert.php @@ -26,7 +26,7 @@ * * @see \Apigee\Edge\Api\Monetization\Entity\LegalEntity */ -class LegalEntityNameConvert extends NameConverterBase implements NameConverterInterface +final class LegalEntityNameConvert extends NameConverterBase implements NameConverterInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/OrganizationProfileNameConverter.php b/src/Api/Monetization/NameConverter/OrganizationProfileNameConverter.php index cc0e4fd6c..77820d91e 100755 --- a/src/Api/Monetization/NameConverter/OrganizationProfileNameConverter.php +++ b/src/Api/Monetization/NameConverter/OrganizationProfileNameConverter.php @@ -20,7 +20,7 @@ use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class OrganizationProfileNameConverter extends NameConverterBase implements NameConverterInterface +final class OrganizationProfileNameConverter extends NameConverterBase implements NameConverterInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/PrepaidBalanceNameConverter.php b/src/Api/Monetization/NameConverter/PrepaidBalanceNameConverter.php index 3bcf93a41..d214c7f30 100644 --- a/src/Api/Monetization/NameConverter/PrepaidBalanceNameConverter.php +++ b/src/Api/Monetization/NameConverter/PrepaidBalanceNameConverter.php @@ -20,7 +20,7 @@ use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class PrepaidBalanceNameConverter extends NameConverterBase implements NameConverterInterface +final class PrepaidBalanceNameConverter extends NameConverterBase implements NameConverterInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/ReportCriteriaNameConverter.php b/src/Api/Monetization/NameConverter/ReportCriteriaNameConverter.php index 0c5ee7cde..bb66dee55 100644 --- a/src/Api/Monetization/NameConverter/ReportCriteriaNameConverter.php +++ b/src/Api/Monetization/NameConverter/ReportCriteriaNameConverter.php @@ -18,7 +18,7 @@ namespace Apigee\Edge\Api\Monetization\NameConverter; -class ReportCriteriaNameConverter extends NameConverterBase +final class ReportCriteriaNameConverter extends NameConverterBase { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/SupportedCurrencyNameConverter.php b/src/Api/Monetization/NameConverter/SupportedCurrencyNameConverter.php index f13daaf36..ec440b7d0 100644 --- a/src/Api/Monetization/NameConverter/SupportedCurrencyNameConverter.php +++ b/src/Api/Monetization/NameConverter/SupportedCurrencyNameConverter.php @@ -20,7 +20,7 @@ use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class SupportedCurrencyNameConverter extends NameConverterBase implements NameConverterInterface +final class SupportedCurrencyNameConverter extends NameConverterBase implements NameConverterInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/NameConverter/TermsAndConditionsNameConverter.php b/src/Api/Monetization/NameConverter/TermsAndConditionsNameConverter.php index 1bf68531b..39339e521 100644 --- a/src/Api/Monetization/NameConverter/TermsAndConditionsNameConverter.php +++ b/src/Api/Monetization/NameConverter/TermsAndConditionsNameConverter.php @@ -20,7 +20,7 @@ use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class TermsAndConditionsNameConverter extends NameConverterBase implements NameConverterInterface +final class TermsAndConditionsNameConverter extends NameConverterBase implements NameConverterInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Normalizer/AddressNormalizer.php b/src/Api/Monetization/Normalizer/AddressNormalizer.php index 952074d7b..c2bb75b25 100644 --- a/src/Api/Monetization/Normalizer/AddressNormalizer.php +++ b/src/Api/Monetization/Normalizer/AddressNormalizer.php @@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class AddressNormalizer extends ObjectNormalizer +final class AddressNormalizer extends ObjectNormalizer { /** * AddressNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php b/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php index 1be6dfb4e..d3fb72a21 100644 --- a/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php +++ b/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class ApiPackageNormalizer extends EntityNormalizer +final class ApiPackageNormalizer extends EntityNormalizer { /** * ApiPackageNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/BalanceNormalizer.php b/src/Api/Monetization/Normalizer/BalanceNormalizer.php index caf718baf..507c8b2ff 100644 --- a/src/Api/Monetization/Normalizer/BalanceNormalizer.php +++ b/src/Api/Monetization/Normalizer/BalanceNormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class BalanceNormalizer extends EntityNormalizer +final class BalanceNormalizer extends EntityNormalizer { /** * BalanceNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/CompanyAcceptedRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/CompanyAcceptedRatePlanNormalizer.php index c1331400d..d1019c1f8 100644 --- a/src/Api/Monetization/Normalizer/CompanyAcceptedRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyAcceptedRatePlanNormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class CompanyAcceptedRatePlanNormalizer extends AcceptedRatePlanNormalizer +final class CompanyAcceptedRatePlanNormalizer extends AcceptedRatePlanNormalizer { /** * CompanyAcceptedRatePlanNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php index f86a78d6a..e6df1e3e9 100644 --- a/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class CompanyPaymentTransactionNormalizer extends PaymentTransactionNormalizer +final class CompanyPaymentTransactionNormalizer extends PaymentTransactionNormalizer { /** * CompanyPaymentTransactionNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/CompanyRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/CompanyRatePlanNormalizer.php index cfc5eaab3..38ba5f552 100644 --- a/src/Api/Monetization/Normalizer/CompanyRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyRatePlanNormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class CompanyRatePlanNormalizer extends LegalEntityRatePlanNormalizer +final class CompanyRatePlanNormalizer extends LegalEntityRatePlanNormalizer { /** * CompanyRatePlanNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/CompanyReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/CompanyReportDefinitionNormalizer.php index 3c155635d..5c5fbd4c7 100644 --- a/src/Api/Monetization/Normalizer/CompanyReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyReportDefinitionNormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class CompanyReportDefinitionNormalizer extends LegalEntityReportDefinitionNormalizer +final class CompanyReportDefinitionNormalizer extends LegalEntityReportDefinitionNormalizer { /** * CompanyReportDefinitionNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php b/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php index 8eba9f357..1d3cb4488 100644 --- a/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php +++ b/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php @@ -21,7 +21,7 @@ use DateTimeZone; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class DateTimeZoneNormalizer implements NormalizerInterface +final class DateTimeZoneNormalizer implements NormalizerInterface { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php index c56ffd0d8..5b3e8be92 100644 --- a/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperCategoryRatePlanInterface; use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; -class DeveloperCategoryRatePlanNormalizer extends RatePlanNormalizer +final class DeveloperCategoryRatePlanNormalizer extends RatePlanNormalizer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php index 341a715a7..d6885e9d3 100644 --- a/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\Monetization\Structure\DeveloperPaymentTransaction; -class DeveloperPaymentTransactionNormalizer extends PaymentTransactionNormalizer +final class DeveloperPaymentTransactionNormalizer extends PaymentTransactionNormalizer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Normalizer/DeveloperRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperRatePlanNormalizer.php index 9c8f0ccb3..5d61cccd4 100644 --- a/src/Api/Monetization/Normalizer/DeveloperRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperRatePlanNormalizer.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperRatePlanInterface; -class DeveloperRatePlanNormalizer extends LegalEntityRatePlanNormalizer +final class DeveloperRatePlanNormalizer extends LegalEntityRatePlanNormalizer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Normalizer/DeveloperReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperReportDefinitionNormalizer.php index 7a5739d57..02302d875 100644 --- a/src/Api/Monetization/Normalizer/DeveloperReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperReportDefinitionNormalizer.php @@ -20,7 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperReportDefinitionInterface; -class DeveloperReportDefinitionNormalizer extends LegalEntityReportDefinitionNormalizer +final class DeveloperReportDefinitionNormalizer extends LegalEntityReportDefinitionNormalizer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Normalizer/EntityNormalizer.php b/src/Api/Monetization/Normalizer/EntityNormalizer.php index cbae260c7..22ade87e6 100644 --- a/src/Api/Monetization/Normalizer/EntityNormalizer.php +++ b/src/Api/Monetization/Normalizer/EntityNormalizer.php @@ -127,7 +127,6 @@ protected function getNestedObjectProperties($object): array $entityReferenceProperties = []; $ro = new ReflectionObject($object); foreach ($ro->getProperties() as $property) { - $property->setAccessible(true); $value = $property->getValue($object); if (is_object($value) && $value instanceof NestedObjectReferenceInterface) { if ($this->nameConverter) { diff --git a/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php index 3259c4e6c..80939ab1e 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php @@ -27,7 +27,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class LegalEntityNormalizer extends EntityNormalizer +final class LegalEntityNormalizer extends EntityNormalizer { /** * LegalEntityNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/OrganizationProfileNormalizer.php b/src/Api/Monetization/Normalizer/OrganizationProfileNormalizer.php index fdde13ac0..1074882b4 100644 --- a/src/Api/Monetization/Normalizer/OrganizationProfileNormalizer.php +++ b/src/Api/Monetization/Normalizer/OrganizationProfileNormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class OrganizationProfileNormalizer extends EntityNormalizer +final class OrganizationProfileNormalizer extends EntityNormalizer { /** * OrganizationProfileNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/PrepaidBalanceNormalizer.php b/src/Api/Monetization/Normalizer/PrepaidBalanceNormalizer.php index 0cbc4557b..789b3cb1f 100644 --- a/src/Api/Monetization/Normalizer/PrepaidBalanceNormalizer.php +++ b/src/Api/Monetization/Normalizer/PrepaidBalanceNormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class PrepaidBalanceNormalizer extends EntityNormalizer +final class PrepaidBalanceNormalizer extends EntityNormalizer { /** * PrepaidBalanceNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php index 0af7aff6b..1f8523891 100644 --- a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php @@ -23,7 +23,7 @@ use Symfony\Component\Serializer\SerializerAwareTrait; use Symfony\Component\Serializer\SerializerInterface; -class RatePlanNormalizerFactory implements NormalizerInterface, SerializerAwareInterface +final class RatePlanNormalizerFactory implements NormalizerInterface, SerializerAwareInterface { use SerializerAwareTrait { setSerializer as private traitSetSerializer; diff --git a/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php b/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php index b8f479692..0cc70f090 100644 --- a/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php +++ b/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php @@ -22,7 +22,7 @@ use Apigee\Edge\Api\Monetization\Structure\RatePlanRateRevShare; use Apigee\Edge\Normalizer\ObjectNormalizer; -class RatePlanRateNormalizer extends ObjectNormalizer +final class RatePlanRateNormalizer extends ObjectNormalizer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php b/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php index ff81fbd40..c5947c5e5 100644 --- a/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php +++ b/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php @@ -28,7 +28,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class ReportCriteriaNormalizer extends ObjectNormalizer +final class ReportCriteriaNormalizer extends ObjectNormalizer { use TimezoneFixerHelperTrait; diff --git a/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php index 3914a8cfd..2c48c39ea 100644 --- a/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; use Apigee\Edge\Api\Monetization\Entity\StandardRatePlanInterface; -class StandardRatePlanNormalizer extends RatePlanNormalizer +final class StandardRatePlanNormalizer extends RatePlanNormalizer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Normalizer/SupportedCurrencyNormalizer.php b/src/Api/Monetization/Normalizer/SupportedCurrencyNormalizer.php index 13e36e4f8..5e9874ab4 100644 --- a/src/Api/Monetization/Normalizer/SupportedCurrencyNormalizer.php +++ b/src/Api/Monetization/Normalizer/SupportedCurrencyNormalizer.php @@ -25,7 +25,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class SupportedCurrencyNormalizer extends EntityNormalizer +final class SupportedCurrencyNormalizer extends EntityNormalizer { /** * SupportedCurrencyNormalizer constructor. diff --git a/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php b/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php index 80d5c8d10..749d1467f 100644 --- a/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php +++ b/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php @@ -27,7 +27,7 @@ use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; use Symfony\Component\Serializer\NameConverter\NameConverterInterface; -class TermsAndConditionsNormalizer extends EntityNormalizer +final class TermsAndConditionsNormalizer extends EntityNormalizer { use TimezoneFixerHelperTrait; diff --git a/src/Api/Monetization/Serializer/AcceptedRatePlanSerializer.php b/src/Api/Monetization/Serializer/AcceptedRatePlanSerializer.php index 2afe0ea86..967eaaeca 100644 --- a/src/Api/Monetization/Serializer/AcceptedRatePlanSerializer.php +++ b/src/Api/Monetization/Serializer/AcceptedRatePlanSerializer.php @@ -23,7 +23,7 @@ use Apigee\Edge\Api\Monetization\Normalizer\AcceptedRatePlanNormalizer; use Apigee\Edge\Api\Monetization\Normalizer\CompanyAcceptedRatePlanNormalizer; -class AcceptedRatePlanSerializer extends EntitySerializer +final class AcceptedRatePlanSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/AddressSerializer.php b/src/Api/Monetization/Serializer/AddressSerializer.php index c2feb6e98..4772aad8f 100644 --- a/src/Api/Monetization/Serializer/AddressSerializer.php +++ b/src/Api/Monetization/Serializer/AddressSerializer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Denormalizer\AddressDenormalizer; use Apigee\Edge\Api\Monetization\Normalizer\AddressNormalizer; -class AddressSerializer extends EntitySerializer +final class AddressSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/ApiPackageSerializer.php b/src/Api/Monetization/Serializer/ApiPackageSerializer.php index 702c31658..0ea6e175f 100644 --- a/src/Api/Monetization/Serializer/ApiPackageSerializer.php +++ b/src/Api/Monetization/Serializer/ApiPackageSerializer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Denormalizer\ApiPackageDenormalizer; use Apigee\Edge\Api\Monetization\Normalizer\ApiPackageNormalizer; -class ApiPackageSerializer extends EntitySerializer +final class ApiPackageSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/BalanceSerializer.php b/src/Api/Monetization/Serializer/BalanceSerializer.php index 8dfa255c0..da562c8b7 100644 --- a/src/Api/Monetization/Serializer/BalanceSerializer.php +++ b/src/Api/Monetization/Serializer/BalanceSerializer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Denormalizer\BalanceDenormalizer; use Apigee\Edge\Api\Monetization\Normalizer\BalanceNormalizer; -class BalanceSerializer extends EntitySerializer +final class BalanceSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/LegalEntitySerializer.php b/src/Api/Monetization/Serializer/LegalEntitySerializer.php index 553cde1c4..6a97c940a 100644 --- a/src/Api/Monetization/Serializer/LegalEntitySerializer.php +++ b/src/Api/Monetization/Serializer/LegalEntitySerializer.php @@ -23,7 +23,7 @@ use Apigee\Edge\Denormalizer\AttributesPropertyDenormalizer; use Apigee\Edge\Normalizer\KeyValueMapNormalizer; -class LegalEntitySerializer extends EntitySerializer +final class LegalEntitySerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/LegalEntityTermsAndConditionsSerializer.php b/src/Api/Monetization/Serializer/LegalEntityTermsAndConditionsSerializer.php index 5c65cccd6..cc4c3549e 100644 --- a/src/Api/Monetization/Serializer/LegalEntityTermsAndConditionsSerializer.php +++ b/src/Api/Monetization/Serializer/LegalEntityTermsAndConditionsSerializer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Denormalizer\TermsAndConditionsDenormalizer; use Apigee\Edge\Api\Monetization\Normalizer\TermsAndConditionsNormalizer; -class LegalEntityTermsAndConditionsSerializer extends EntitySerializer +final class LegalEntityTermsAndConditionsSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/OrganizationProfileSerializer.php b/src/Api/Monetization/Serializer/OrganizationProfileSerializer.php index 395dd1692..537076a14 100644 --- a/src/Api/Monetization/Serializer/OrganizationProfileSerializer.php +++ b/src/Api/Monetization/Serializer/OrganizationProfileSerializer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Denormalizer\OrganizationProfileDenormalizer; use Apigee\Edge\Api\Monetization\Normalizer\OrganizationProfileNormalizer; -class OrganizationProfileSerializer extends EntitySerializer +final class OrganizationProfileSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/PaymentTransactionSerializer.php b/src/Api/Monetization/Serializer/PaymentTransactionSerializer.php index 9dd78243d..a1c7475bb 100644 --- a/src/Api/Monetization/Serializer/PaymentTransactionSerializer.php +++ b/src/Api/Monetization/Serializer/PaymentTransactionSerializer.php @@ -23,7 +23,7 @@ use Apigee\Edge\Api\Monetization\Normalizer\CompanyPaymentTransactionNormalizer; use Apigee\Edge\Api\Monetization\Normalizer\DeveloperPaymentTransactionNormalizer; -class PaymentTransactionSerializer extends EntitySerializer +final class PaymentTransactionSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/PrepaidBalanceSerializer.php b/src/Api/Monetization/Serializer/PrepaidBalanceSerializer.php index 0e6408aa3..847022e02 100644 --- a/src/Api/Monetization/Serializer/PrepaidBalanceSerializer.php +++ b/src/Api/Monetization/Serializer/PrepaidBalanceSerializer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Denormalizer\PrepaidBalanceDenormalizer; use Apigee\Edge\Api\Monetization\Normalizer\PrepaidBalanceNormalizer; -class PrepaidBalanceSerializer extends EntitySerializer +final class PrepaidBalanceSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/RatePlanSerializer.php b/src/Api/Monetization/Serializer/RatePlanSerializer.php index 292540157..20b99f143 100644 --- a/src/Api/Monetization/Serializer/RatePlanSerializer.php +++ b/src/Api/Monetization/Serializer/RatePlanSerializer.php @@ -23,7 +23,7 @@ use Apigee\Edge\Api\Monetization\Normalizer\RatePlanNormalizerFactory; use Apigee\Edge\Api\Monetization\Normalizer\RatePlanRateNormalizer; -class RatePlanSerializer extends EntitySerializer +final class RatePlanSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/ReportDefinitionSerializer.php b/src/Api/Monetization/Serializer/ReportDefinitionSerializer.php index 6826ade04..04d6de8c6 100644 --- a/src/Api/Monetization/Serializer/ReportDefinitionSerializer.php +++ b/src/Api/Monetization/Serializer/ReportDefinitionSerializer.php @@ -27,7 +27,7 @@ use Apigee\Edge\Api\Monetization\Normalizer\ReportCriteriaNormalizer; use Apigee\Edge\Api\Monetization\Normalizer\ReportDefinitionNormalizer; -class ReportDefinitionSerializer extends EntitySerializer +final class ReportDefinitionSerializer extends EntitySerializer { /** * ReportDefinitionSerializer constructor. diff --git a/src/Api/Monetization/Serializer/SupportedCurrencySerializer.php b/src/Api/Monetization/Serializer/SupportedCurrencySerializer.php index 3315f7ceb..0a7d72370 100644 --- a/src/Api/Monetization/Serializer/SupportedCurrencySerializer.php +++ b/src/Api/Monetization/Serializer/SupportedCurrencySerializer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Denormalizer\SupportedCurrencyDenormalizer; use Apigee\Edge\Api\Monetization\Normalizer\SupportedCurrencyNormalizer; -class SupportedCurrencySerializer extends EntitySerializer +final class SupportedCurrencySerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Serializer/TermsAndConditionsSerializer.php b/src/Api/Monetization/Serializer/TermsAndConditionsSerializer.php index 2b261f1f6..48bacebee 100644 --- a/src/Api/Monetization/Serializer/TermsAndConditionsSerializer.php +++ b/src/Api/Monetization/Serializer/TermsAndConditionsSerializer.php @@ -21,7 +21,7 @@ use Apigee\Edge\Api\Monetization\Denormalizer\TermsAndConditionsDenormalizer; use Apigee\Edge\Api\Monetization\Normalizer\TermsAndConditionsNormalizer; -class TermsAndConditionsSerializer extends EntitySerializer +final class TermsAndConditionsSerializer extends EntitySerializer { /** * {@inheritdoc} diff --git a/src/Api/Monetization/Utility/TimezoneFixerHelperTrait.php b/src/Api/Monetization/Utility/TimezoneFixerHelperTrait.php index 5fdc04e80..e89620cdb 100644 --- a/src/Api/Monetization/Utility/TimezoneFixerHelperTrait.php +++ b/src/Api/Monetization/Utility/TimezoneFixerHelperTrait.php @@ -51,7 +51,6 @@ protected function fixTimeZoneOnNormalization($object, $normalized, DateTimeZone $ro = new ReflectionObject($object); $dateDenormalizer = new DateTimeNormalizer([DateTimeNormalizer::FORMAT_KEY => EntityInterface::DATE_FORMAT, DateTimeNormalizer::TIMEZONE_KEY => $orgTimezone]); foreach ($ro->getProperties() as $property) { - $property->setAccessible(true); $value = $property->getValue($object); if ($value instanceof DateTimeImmutable) { $normalized->{$property->getName()} = $dateDenormalizer->normalize($value, DateTimeImmutable::class); @@ -86,7 +85,6 @@ protected function fixTimeZoneOnDenormalization($object, $denormalized, DateTime foreach ($object as $prop_name => $prop_value) { if ($ro->hasProperty($prop_name)) { $property = $ro->getProperty($prop_name); - $property->setAccessible(true); $value = $property->getValue($denormalized); if ($value instanceof DateTimeImmutable) { $property->setValue($denormalized, $dateDenormalizer->denormalize($prop_value, DateTimeImmutable::class)); diff --git a/src/Client.php b/src/Client.php index 71e953742..f426aa237 100644 --- a/src/Client.php +++ b/src/Client.php @@ -49,6 +49,7 @@ * Default API client implementation for Apigee Edge. * * @psalm-suppress DeprecatedInterface - DeprecatedInterface will be replaced in 3.x branch. + * @psalm-suppress ClassMustBeFinal */ class Client implements ClientInterface { diff --git a/src/Controller/PaginationHelperTrait.php b/src/Controller/PaginationHelperTrait.php index 4ceccf8d2..db6705447 100644 --- a/src/Controller/PaginationHelperTrait.php +++ b/src/Controller/PaginationHelperTrait.php @@ -178,7 +178,7 @@ private function listEntitiesWithCps(?PagerInterface $pager = null, array $query $responseArray = $this->getResultsInRange($pager, $query_params); // Ignore entity type key from response, ex.: developer, // apiproduct, etc. - $responseArray = reset($responseArray); + $responseArray = reset($responseArray) ?: []; return $this->responseArrayToArrayOfEntities($responseArray, $key_provider); } else { @@ -186,7 +186,7 @@ private function listEntitiesWithCps(?PagerInterface $pager = null, array $query $responseArray = $this->getResultsInRange($this->createPager(), $query_params); // Ignore entity type key from response, ex.: developer, apiproduct, // etc. - $responseArray = reset($responseArray); + $responseArray = reset($responseArray) ?: []; if (empty($responseArray)) { return []; } @@ -197,7 +197,7 @@ private function listEntitiesWithCps(?PagerInterface $pager = null, array $query $tmp = $this->getResultsInRange($this->createPager(0, $lastId), $query_params); // Ignore entity type key from response, ex.: developer, // apiproduct, etc. - $tmp = reset($tmp); + $tmp = reset($tmp) ?: []; // Remove the first item from the list because it is the same // as the last item of $entities at this moment. // Apigee Edge response always starts with the requested entity @@ -245,7 +245,7 @@ private function listEntitiesWithoutCps(?PagerInterface $pager = null, array $qu $response = $this->getClient()->get($uri); $responseArray = $this->responseToArray($response); // Ignore entity type key from response, ex.: apiProduct. - $responseArray = reset($responseArray); + $responseArray = reset($responseArray) ?: []; $entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider); @@ -394,7 +394,7 @@ private function simulateCpsPagination(PagerInterface $pager, array $result, ?ar $array_search_haystack = $array_search_haystack ?? $result; // If start key is null let's set it to the first key in the // result just like the API would do. - $start_key = $pager->getStartKey() ?? reset($array_search_haystack); + $start_key = $pager->getStartKey() ?? (reset($array_search_haystack) ?: ''); $offset = array_search($start_key, $array_search_haystack); // Start key has not been found in the response. Apigee Edge with // CPS enabled would return an HTTP 404, with error code diff --git a/src/Denormalizer/AttributesPropertyDenormalizer.php b/src/Denormalizer/AttributesPropertyDenormalizer.php index 0aee62adc..357505a27 100644 --- a/src/Denormalizer/AttributesPropertyDenormalizer.php +++ b/src/Denormalizer/AttributesPropertyDenormalizer.php @@ -23,7 +23,7 @@ /** * Class AttributesPropertyDenormalizer. */ -class AttributesPropertyDenormalizer extends KeyValueMapDenormalizer +final class AttributesPropertyDenormalizer extends KeyValueMapDenormalizer { /** * {@inheritdoc} diff --git a/src/Denormalizer/CredentialProductDenormalizer.php b/src/Denormalizer/CredentialProductDenormalizer.php index 43cd89de2..b140607b0 100644 --- a/src/Denormalizer/CredentialProductDenormalizer.php +++ b/src/Denormalizer/CredentialProductDenormalizer.php @@ -25,7 +25,7 @@ /** * Class CredentialProductDenormalizer. */ -class CredentialProductDenormalizer implements DenormalizerInterface +final class CredentialProductDenormalizer implements DenormalizerInterface { /** * {@inheritdoc} @@ -37,7 +37,7 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return CredentialProductInterface::class === $type || $type instanceof CredentialProductInterface || in_array(CredentialProductInterface::class, class_implements($type)); + return CredentialProductInterface::class === $type || $type instanceof CredentialProductInterface || in_array(CredentialProductInterface::class, class_implements($type) ?: []); } /** diff --git a/src/Denormalizer/EdgeDateDenormalizer.php b/src/Denormalizer/EdgeDateDenormalizer.php index 6366e0444..9e75694ec 100644 --- a/src/Denormalizer/EdgeDateDenormalizer.php +++ b/src/Denormalizer/EdgeDateDenormalizer.php @@ -28,7 +28,7 @@ /** * Class EdgeDateDenormalizer. */ -class EdgeDateDenormalizer implements DenormalizerInterface +final class EdgeDateDenormalizer implements DenormalizerInterface { private static $supportedTypes = [ DateTimeInterface::class => true, diff --git a/src/Denormalizer/KeyValueMapDenormalizer.php b/src/Denormalizer/KeyValueMapDenormalizer.php index cdc0027f4..0118f67f0 100644 --- a/src/Denormalizer/KeyValueMapDenormalizer.php +++ b/src/Denormalizer/KeyValueMapDenormalizer.php @@ -44,7 +44,7 @@ public function supportsDenormalization($data, $type, $format = null) return false; } - return KeyValueMapInterface::class === $type || $type instanceof KeyValueMapInterface || in_array(KeyValueMapInterface::class, class_implements($type)); + return KeyValueMapInterface::class === $type || $type instanceof KeyValueMapInterface || in_array(KeyValueMapInterface::class, class_implements($type) ?: []); } /** diff --git a/src/Denormalizer/PropertiesPropertyDenormalizer.php b/src/Denormalizer/PropertiesPropertyDenormalizer.php index 32d02590f..26abbbcec 100644 --- a/src/Denormalizer/PropertiesPropertyDenormalizer.php +++ b/src/Denormalizer/PropertiesPropertyDenormalizer.php @@ -23,7 +23,7 @@ /** * Class PropertiesPropertyDenormalizer. */ -class PropertiesPropertyDenormalizer extends KeyValueMapDenormalizer +final class PropertiesPropertyDenormalizer extends KeyValueMapDenormalizer { /** * {@inheritdoc} diff --git a/src/Exception/ApigeeOnGcpOauth2AuthenticationException.php b/src/Exception/ApigeeOnGcpOauth2AuthenticationException.php index cf7ce1a91..1dcdd78bb 100644 --- a/src/Exception/ApigeeOnGcpOauth2AuthenticationException.php +++ b/src/Exception/ApigeeOnGcpOauth2AuthenticationException.php @@ -21,6 +21,6 @@ /** * For ApigeeOnGcpOauth2Authentication authentication issues. */ -class ApigeeOnGcpOauth2AuthenticationException extends ApiException +final class ApigeeOnGcpOauth2AuthenticationException extends ApiException { } diff --git a/src/Exception/ClientErrorException.php b/src/Exception/ClientErrorException.php index bb721e2b4..be2601043 100644 --- a/src/Exception/ClientErrorException.php +++ b/src/Exception/ClientErrorException.php @@ -23,6 +23,6 @@ * * For >= 400 and < 500 HTTP codes. */ -class ClientErrorException extends ApiResponseException +final class ClientErrorException extends ApiResponseException { } diff --git a/src/Exception/CpsNotEnabledException.php b/src/Exception/CpsNotEnabledException.php index adb337f1b..beb1d5c5d 100644 --- a/src/Exception/CpsNotEnabledException.php +++ b/src/Exception/CpsNotEnabledException.php @@ -30,7 +30,7 @@ * @see https://docs.apigee.com/api-services/content/api-reference-getting-started#cps * @deprecated Since 2.0.1, https://github.com/apigee/apigee-client-php/pull/43/files */ -class CpsNotEnabledException extends RuntimeException +final class CpsNotEnabledException extends RuntimeException { /** * @var string diff --git a/src/Exception/HybridOauth2AuthenticationException.php b/src/Exception/HybridOauth2AuthenticationException.php index b9f2cfd79..fb361a2c1 100644 --- a/src/Exception/HybridOauth2AuthenticationException.php +++ b/src/Exception/HybridOauth2AuthenticationException.php @@ -24,6 +24,6 @@ * @deprecated in 2.0.9, will be removed in 3.0.0. * https://github.com/apigee/apigee-client-php/issues/112 */ -class HybridOauth2AuthenticationException extends ApiException +final class HybridOauth2AuthenticationException extends ApiException { } diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index 0460e7178..bda2c1ebf 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -21,6 +21,6 @@ /** * This library's own invalid argument exception. */ -class InvalidArgumentException extends \InvalidArgumentException implements ApiClientException +final class InvalidArgumentException extends \InvalidArgumentException implements ApiClientException { } diff --git a/src/Exception/InvalidJsonException.php b/src/Exception/InvalidJsonException.php index 97e574cc7..2d7e55e10 100644 --- a/src/Exception/InvalidJsonException.php +++ b/src/Exception/InvalidJsonException.php @@ -26,7 +26,7 @@ /** * Class InvalidJsonException. */ -class InvalidJsonException extends ApiResponseException +final class InvalidJsonException extends ApiResponseException { /** @var string */ protected $jsonErrorMessage; diff --git a/src/Exception/OauthAccessTokenAuthenticationException.php b/src/Exception/OauthAccessTokenAuthenticationException.php index e735ad6e4..bf8bf6cce 100644 --- a/src/Exception/OauthAccessTokenAuthenticationException.php +++ b/src/Exception/OauthAccessTokenAuthenticationException.php @@ -21,6 +21,6 @@ /** * Exception for the case when authentication fails by using Oauth access token. */ -class OauthAccessTokenAuthenticationException extends ApiRequestException +final class OauthAccessTokenAuthenticationException extends ApiRequestException { } diff --git a/src/Exception/OauthAuthenticationException.php b/src/Exception/OauthAuthenticationException.php index 3c12b578e..27eb565af 100644 --- a/src/Exception/OauthAuthenticationException.php +++ b/src/Exception/OauthAuthenticationException.php @@ -21,6 +21,6 @@ /** * For OAuth authentication issues. */ -class OauthAuthenticationException extends ApiException +final class OauthAuthenticationException extends ApiException { } diff --git a/src/Exception/OauthRefreshTokenExpiredException.php b/src/Exception/OauthRefreshTokenExpiredException.php index 6bcd24e2f..0fe2aae36 100644 --- a/src/Exception/OauthRefreshTokenExpiredException.php +++ b/src/Exception/OauthRefreshTokenExpiredException.php @@ -21,6 +21,6 @@ /** * In case if the client is unable refresh access token by using the refresh token because it has expired. */ -class OauthRefreshTokenExpiredException extends ApiResponseException +final class OauthRefreshTokenExpiredException extends ApiResponseException { } diff --git a/src/Exception/ServerErrorException.php b/src/Exception/ServerErrorException.php index ee36f2a48..6b38a6aa7 100644 --- a/src/Exception/ServerErrorException.php +++ b/src/Exception/ServerErrorException.php @@ -23,6 +23,6 @@ * * For >= 500 HTTP codes. */ -class ServerErrorException extends ApiResponseException +final class ServerErrorException extends ApiResponseException { } diff --git a/src/Exception/UnexpectedValueException.php b/src/Exception/UnexpectedValueException.php index 7cebda497..54b5ec524 100644 --- a/src/Exception/UnexpectedValueException.php +++ b/src/Exception/UnexpectedValueException.php @@ -23,7 +23,7 @@ /** * Thrown when a value of a property does not match with its expected type. */ -class UnexpectedValueException extends BaseUnexpectedValueException implements ApiClientException +final class UnexpectedValueException extends BaseUnexpectedValueException implements ApiClientException { /** * UnexpectedValueException constructor. diff --git a/src/Exception/UninitializedPropertyException.php b/src/Exception/UninitializedPropertyException.php index 70b6db6fb..cb6b2d5c2 100644 --- a/src/Exception/UninitializedPropertyException.php +++ b/src/Exception/UninitializedPropertyException.php @@ -28,7 +28,7 @@ * * @see \Symfony\Component\Serializer\Normalizer\NormalizerInterface::normalize() */ -class UninitializedPropertyException extends LogicException implements ApiClientException +final class UninitializedPropertyException extends LogicException implements ApiClientException { /** * UninitializedPropertyException constructor. diff --git a/src/HttpClient/Plugin/Authentication/ApigeeOnGcpOauth2.php b/src/HttpClient/Plugin/Authentication/ApigeeOnGcpOauth2.php index 8dc50bb95..3a5de81ed 100644 --- a/src/HttpClient/Plugin/Authentication/ApigeeOnGcpOauth2.php +++ b/src/HttpClient/Plugin/Authentication/ApigeeOnGcpOauth2.php @@ -29,6 +29,7 @@ * ApigeeOnGcpOauth2 authentication plugin for authenticating to GCP API. * * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount + * @psalm-suppress ClassMustBeFinal */ class ApigeeOnGcpOauth2 extends AbstractOauth { diff --git a/src/HttpClient/Plugin/Authentication/GceServiceAccount.php b/src/HttpClient/Plugin/Authentication/GceServiceAccount.php index c23b8735a..275798a23 100644 --- a/src/HttpClient/Plugin/Authentication/GceServiceAccount.php +++ b/src/HttpClient/Plugin/Authentication/GceServiceAccount.php @@ -31,7 +31,7 @@ * * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount */ -class GceServiceAccount extends AbstractOauth +final class GceServiceAccount extends AbstractOauth { public const DEFAULT_GCE_AUTH_SERVER = 'http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token'; diff --git a/src/HttpClient/Plugin/Authentication/HybridOauth2.php b/src/HttpClient/Plugin/Authentication/HybridOauth2.php index a85e46a54..452c81ae1 100644 --- a/src/HttpClient/Plugin/Authentication/HybridOauth2.php +++ b/src/HttpClient/Plugin/Authentication/HybridOauth2.php @@ -31,6 +31,7 @@ * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount * @deprecated in 2.0.9, will be removed in 3.0.0. * https://github.com/apigee/apigee-client-php/issues/112 + * @psalm-suppress ClassMustBeFinal */ class HybridOauth2 extends AbstractOauth { diff --git a/src/HttpClient/Plugin/Authentication/NullAuthentication.php b/src/HttpClient/Plugin/Authentication/NullAuthentication.php index df8ded0db..ef72eff29 100644 --- a/src/HttpClient/Plugin/Authentication/NullAuthentication.php +++ b/src/HttpClient/Plugin/Authentication/NullAuthentication.php @@ -24,7 +24,7 @@ /** * Null authentication. */ -class NullAuthentication implements Authentication +final class NullAuthentication implements Authentication { /** * {@inheritdoc} diff --git a/src/HttpClient/Plugin/Authentication/Oauth.php b/src/HttpClient/Plugin/Authentication/Oauth.php index b97d2182f..6c1797e14 100644 --- a/src/HttpClient/Plugin/Authentication/Oauth.php +++ b/src/HttpClient/Plugin/Authentication/Oauth.php @@ -29,6 +29,8 @@ * Oauth authentication plugin for authenticating to Apigee Edge with Oauth (SAML). * * @see https://apidocs.apigee.com/api-reference/content/using-oauth2-security-apigee-edge-management-api + * + * @psalm-suppress ClassMustBeFinal */ class Oauth extends AbstractOauth { diff --git a/src/HttpClient/Plugin/RetryOauthAuthenticationPlugin.php b/src/HttpClient/Plugin/RetryOauthAuthenticationPlugin.php index fdc272218..c6941b71f 100644 --- a/src/HttpClient/Plugin/RetryOauthAuthenticationPlugin.php +++ b/src/HttpClient/Plugin/RetryOauthAuthenticationPlugin.php @@ -29,7 +29,7 @@ /** * Automatically re-authenticate if a request fails because of an expired access- or refresh token. */ -class RetryOauthAuthenticationPlugin implements Plugin +final class RetryOauthAuthenticationPlugin implements Plugin { /** * @var AbstractOauth diff --git a/src/HttpClient/Utility/Builder.php b/src/HttpClient/Utility/Builder.php index f7f3991d2..306edc418 100644 --- a/src/HttpClient/Utility/Builder.php +++ b/src/HttpClient/Utility/Builder.php @@ -31,7 +31,7 @@ * * Helper class that makes creation of HTTP client instances easier. */ -class Builder implements BuilderInterface +final class Builder implements BuilderInterface { /** @var ClientInterface */ private $httpClient; @@ -168,12 +168,10 @@ public function clearPlugins(): void * Set or remove rebuild flag from the client. * * @param bool $rebuild - * - * @return bool */ - private function needsRebuild(bool $rebuild = true): bool + private function needsRebuild(bool $rebuild = true): void { - return $this->rebuild = $rebuild; + $this->rebuild = $rebuild; } /** diff --git a/src/Normalizer/CredentialProductNormalizer.php b/src/Normalizer/CredentialProductNormalizer.php index 7a1b1adba..0cd4b6c72 100644 --- a/src/Normalizer/CredentialProductNormalizer.php +++ b/src/Normalizer/CredentialProductNormalizer.php @@ -25,7 +25,7 @@ /** * Class CredentialProductNormalizer. */ -class CredentialProductNormalizer implements NormalizerInterface +final class CredentialProductNormalizer implements NormalizerInterface { /** * {@inheritdoc} diff --git a/src/Normalizer/EdgeDateNormalizer.php b/src/Normalizer/EdgeDateNormalizer.php index 770252074..a29e6ff2e 100644 --- a/src/Normalizer/EdgeDateNormalizer.php +++ b/src/Normalizer/EdgeDateNormalizer.php @@ -21,7 +21,7 @@ use DateTimeInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; -class EdgeDateNormalizer implements NormalizerInterface +final class EdgeDateNormalizer implements NormalizerInterface { /** * {@inheritdoc} diff --git a/src/Normalizer/PropertiesPropertyNormalizer.php b/src/Normalizer/PropertiesPropertyNormalizer.php index 7818c6377..d0f150173 100644 --- a/src/Normalizer/PropertiesPropertyNormalizer.php +++ b/src/Normalizer/PropertiesPropertyNormalizer.php @@ -24,7 +24,7 @@ /** * Class PropertiesPropertyNormalizer. */ -class PropertiesPropertyNormalizer extends KeyValueMapNormalizer +final class PropertiesPropertyNormalizer extends KeyValueMapNormalizer { /** * Transforms JSON representation of properties property to compatible with what Edge accepts. diff --git a/src/PropertyAccess/PropertyAccessorDecorator.php b/src/PropertyAccess/PropertyAccessorDecorator.php index e47653fa6..6f938330f 100644 --- a/src/PropertyAccess/PropertyAccessorDecorator.php +++ b/src/PropertyAccess/PropertyAccessorDecorator.php @@ -154,7 +154,6 @@ private static function processTypeErrorOnGetValue($object, string $property, Ty if (false !== $pos) { $ro = new ReflectionObject($object); $rp = $ro->getProperty($property); - $rp->setAccessible(true); $pos += strlen($delim); $actualValue = $rp->getValue($object); $expectedType = substr($error->getMessage(), $pos, (int) strpos($error->getMessage(), ',', $pos) - $pos); diff --git a/src/Structure/ObjectCopyHelperTrait.php b/src/Structure/ObjectCopyHelperTrait.php index 2958e8622..6f60cbc8e 100644 --- a/src/Structure/ObjectCopyHelperTrait.php +++ b/src/Structure/ObjectCopyHelperTrait.php @@ -31,7 +31,6 @@ public function __clone() { $ro = new ReflectionObject($this); foreach ($ro->getProperties() as $property) { - $property->setAccessible(true); $value = $property->getValue($this); if (is_object($value)) { $property->setValue($this, clone $value); diff --git a/tests/Api/ApigeeX/Controller/PrepaidBalanceControllerTestBase.php b/tests/Api/ApigeeX/Controller/PrepaidBalanceControllerTestBase.php index 9689119e6..8fadfbcfc 100644 --- a/tests/Api/ApigeeX/Controller/PrepaidBalanceControllerTestBase.php +++ b/tests/Api/ApigeeX/Controller/PrepaidBalanceControllerTestBase.php @@ -90,10 +90,8 @@ public function testGetPrepaidBalance(): void // We need to prepaid balance serializer from the controller. $ro = new ReflectionObject(static::entityController()); $property = $ro->getProperty('decorated'); - $property->setAccessible(true); $ro = new ReflectionObject($property->getValue(static::entityController())); $rp = $ro->getProperty('prepaidBalanceSerializer'); - $rp->setAccessible(true); $validator = new PrepaidBalanceSerializerValidator($rp->getValue($property->getValue(static::entityController()))); foreach ($entities as $entity) { diff --git a/tests/Api/Monetization/Controller/PrepaidBalanceControllerTestBase.php b/tests/Api/Monetization/Controller/PrepaidBalanceControllerTestBase.php index 0cf1aa440..58bde1029 100644 --- a/tests/Api/Monetization/Controller/PrepaidBalanceControllerTestBase.php +++ b/tests/Api/Monetization/Controller/PrepaidBalanceControllerTestBase.php @@ -105,10 +105,8 @@ public function testGetPrepaidBalance(): void // We need to prepaid balance serializer from the controller. $ro = new ReflectionObject(static::entityController()); $property = $ro->getProperty('decorated'); - $property->setAccessible(true); $ro = new ReflectionObject($property->getValue(static::entityController())); $rp = $ro->getProperty('prepaidBalanceSerializer'); - $rp->setAccessible(true); $validator = new PrepaidBalanceSerializerValidator($rp->getValue($property->getValue(static::entityController()))); foreach ($entities as $entity) { $validator->validate($json[$i], $entity); diff --git a/tests/Api/Monetization/Controller/TimezoneConversionTestTrait.php b/tests/Api/Monetization/Controller/TimezoneConversionTestTrait.php index 431dabc81..aefeaf5a4 100644 --- a/tests/Api/Monetization/Controller/TimezoneConversionTestTrait.php +++ b/tests/Api/Monetization/Controller/TimezoneConversionTestTrait.php @@ -111,7 +111,6 @@ private function getDateProperties(EntityInterface $entity): array $ro = new ReflectionObject($entity); foreach ($ro->getProperties() as $property) { - $property->setAccessible(true); $value = $property->getValue($entity); if ($value instanceof DateTimeInterface) { $properties[] = $property->getName(); diff --git a/tests/Api/Monetization/EntitySerializer/PropertyValidator/PaymentTransactionPropertyValidator.php b/tests/Api/Monetization/EntitySerializer/PropertyValidator/PaymentTransactionPropertyValidator.php index bff7b681e..0d6749527 100644 --- a/tests/Api/Monetization/EntitySerializer/PropertyValidator/PaymentTransactionPropertyValidator.php +++ b/tests/Api/Monetization/EntitySerializer/PropertyValidator/PaymentTransactionPropertyValidator.php @@ -84,7 +84,6 @@ public function validate(stdClass $input, stdClass $output, EntityInterface $ent unset($expected->organization); $ro = new ReflectionObject($lentity); $orgProp = $ro->getProperty('organization'); - $orgProp->setAccessible(true); // Only way to clear organization. $orgProp->setValue($lentity, null); // These properties are missing (not returned by Apigee Edge) on a diff --git a/tests/PropertyAccess/PropertyAccessorDecoratorTest.php b/tests/PropertyAccess/PropertyAccessorDecoratorTest.php index 205df29aa..6d41d85bb 100644 --- a/tests/PropertyAccess/PropertyAccessorDecoratorTest.php +++ b/tests/PropertyAccess/PropertyAccessorDecoratorTest.php @@ -31,6 +31,10 @@ use Symfony\Component\PropertyAccess\Tests\PropertyAccessorTest; use TypeError; +if (!class_exists(PropertyAccessorTest::class)) { + return; +} + class PropertyAccessorDecoratorTest extends PropertyAccessorTest { use PhpUnitBcBridgeTrait; @@ -124,7 +128,6 @@ protected function setUp(): void // class. $ro = new ReflectionClass(PropertyAccessorTest::class); $property = $ro->getProperty('propertyAccessor'); - $property->setAccessible(true); $property->setValue($this, $this->propertyAccessor); } diff --git a/tests/Serializer/EntitySerializerTest.php b/tests/Serializer/EntitySerializerTest.php index fad933293..0775cee85 100644 --- a/tests/Serializer/EntitySerializerTest.php +++ b/tests/Serializer/EntitySerializerTest.php @@ -174,9 +174,7 @@ public function testSetPropertiesFromResponseWithValidValues(): void /** @var ReflectionProperty $originalProperty */ /** @var ReflectionProperty $entityProperty */ $originalProperty = $roOriginal->getProperty('propertyWithoutGetter'); - $originalProperty->setAccessible(true); $entityProperty = $roEntity->getProperty('propertyWithoutGetter'); - $entityProperty->setAccessible(true); $this->assertEquals($originalProperty->getValue($original), $entityProperty->getValue($entity)); // Ensure that value of a property that uses variable-length diff --git a/tests/Test/Controller/EntityControllerTestBase.php b/tests/Test/Controller/EntityControllerTestBase.php index a7f14d19d..e4e0ed302 100644 --- a/tests/Test/Controller/EntityControllerTestBase.php +++ b/tests/Test/Controller/EntityControllerTestBase.php @@ -66,10 +66,8 @@ protected function entitySerializer(): EntitySerializerInterface // a controller. $ro = new ReflectionObject(static::entityController()); $property = $ro->getProperty('decorated'); - $property->setAccessible(true); $ro = new ReflectionObject($property->getValue(static::entityController())); $rm = $ro->getMethod('getEntitySerializer'); - $rm->setAccessible(true); static::$instance = $rm->invoke($property->getValue(static::entityController())); } From 1266d7cf797089b7e146cd791ca87e603587c0db Mon Sep 17 00:00:00 2001 From: shailesh-google Date: Mon, 4 May 2026 17:00:05 +0530 Subject: [PATCH 3/5] fixed styling issue --- .../Controller/AcceptedRatePlanController.php | 2 +- .../AcceptedRatePlanControllerInterface.php | 4 +- .../Controller/AppControllerInterface.php | 4 +- .../Controller/PaginationHelperTrait.php | 77 +++++------ .../Controller/PrepaidBalanceController.php | 2 +- .../PrepaidBalanceControllerInterface.php | 2 +- .../Denormalizer/RatePlanDenormalizer.php | 2 +- .../RatePlanDenormalizerFactory.php | 4 +- src/Api/ApigeeX/Entity/RatePlan.php | 8 +- src/Api/ApigeeX/Entity/RatePlanInterface.php | 8 +- .../NameConverter/RatePlanNameConverter.php | 1 + .../Normalizer/RatePlanNormalizerFactory.php | 4 +- .../Controller/AppControllerInterface.php | 4 +- .../Management/Controller/StatsController.php | 6 +- src/Api/Management/Entity/AppInterface.php | 2 +- .../Controller/AcceptedRatePlanController.php | 2 +- .../AcceptedRatePlanControllerInterface.php | 4 +- ...yTermsAndConditionsControllerInterface.php | 6 +- .../Controller/PrepaidBalanceController.php | 2 +- .../PrepaidBalanceControllerInterface.php | 2 +- .../Denormalizer/LegalEntityDenormalizer.php | 4 +- .../RatePlanDenormalizerFactory.php | 4 +- .../Property/AddressesPropertyAwareTrait.php | 4 +- .../Property/AddressesPropertyInterface.php | 2 +- .../ApiProductsPropertyAwareTrait.php | 2 +- src/Api/Monetization/Entity/RatePlan.php | 2 +- .../Monetization/Entity/RatePlanInterface.php | 2 +- .../Normalizer/RatePlanNormalizerFactory.php | 4 +- .../Monetization/Structure/RatePlanDetail.php | 4 +- src/Controller/PaginationHelperTrait.php | 130 +++++++++--------- .../Authentication/ApigeeOnGcpOauth2.php | 1 + .../Plugin/Authentication/HybridOauth2.php | 1 + src/HttpClient/Utility/Builder.php | 2 +- src/Structure/KeyValueMapInterface.php | 2 +- ...edEntityListingControllerTestTraitBase.php | 2 +- ...atedEntityIdListingControllerTestTrait.php | 2 +- ...edEntityListingControllerTestTraitBase.php | 2 +- ...tyTermsAndConditionsControllerTestBase.php | 2 +- .../PropertyAccessorDecoratorTest.php | 18 +-- tests/Test/Entity/MockEntity.php | 6 +- ...pertyValidatorsAwareValidatorInterface.php | 2 +- .../PropertyValidatorsAwareValidatorTrait.php | 4 +- tests/Test/TestClientFactory.php | 2 +- tests/Test/Utility/EntityStorage.php | 4 +- 44 files changed, 176 insertions(+), 178 deletions(-) diff --git a/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php b/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php index 6d3d81c0b..23df4fa88 100755 --- a/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php +++ b/src/Api/ApigeeX/Controller/AcceptedRatePlanController.php @@ -144,7 +144,7 @@ protected function alterRequestPayload(array &$payload, AcceptedRatePlanInterfac * @param array $query_params * Additional query parameters. * - * @return \Apigee\Edge\Api\ApigeeX\Entity\AcceptedRatePlanInterface[] + * @return AcceptedRatePlanInterface[] * * @psalm-suppress PossiblyNullArrayOffset - id() does not return null here. */ diff --git a/src/Api/ApigeeX/Controller/AcceptedRatePlanControllerInterface.php b/src/Api/ApigeeX/Controller/AcceptedRatePlanControllerInterface.php index 07971226c..63541dc08 100755 --- a/src/Api/ApigeeX/Controller/AcceptedRatePlanControllerInterface.php +++ b/src/Api/ApigeeX/Controller/AcceptedRatePlanControllerInterface.php @@ -35,7 +35,7 @@ interface AcceptedRatePlanControllerInterface extends /** * Gets all accepted rate plans. * - * @return \Apigee\Edge\Api\ApigeeX\Entity\AcceptedRatePlanInterface[] + * @return AcceptedRatePlanInterface[] */ public function getAllAcceptedRatePlans(): array; @@ -45,7 +45,7 @@ public function getAllAcceptedRatePlans(): array; * @param int|null $limit * @param int $page * - * @return \Apigee\Edge\Api\ApigeeX\Entity\AcceptedRatePlanInterface[] + * @return AcceptedRatePlanInterface[] */ public function getPaginatedAcceptedRatePlanList(?int $limit = null, int $page = 1): array; diff --git a/src/Api/ApigeeX/Controller/AppControllerInterface.php b/src/Api/ApigeeX/Controller/AppControllerInterface.php index dc9f7f275..0e0822b91 100644 --- a/src/Api/ApigeeX/Controller/AppControllerInterface.php +++ b/src/Api/ApigeeX/Controller/AppControllerInterface.php @@ -82,7 +82,7 @@ public function listAppIds(?PagerInterface $pager = null): array; * @param PagerInterface|null $pager * Number of results to return. * - * @return \Apigee\Edge\Api\Management\Entity\AppInterface[] + * @return AppInterface[] * An array that can contain both developer- and appgroup app entities. */ public function listApps(bool $includeCredentials = false, ?PagerInterface $pager = null): array; @@ -110,7 +110,7 @@ public function listAppIdsByStatus(string $status, ?PagerInterface $pager = null * @param PagerInterface|null $pager * Number of results to return. * - * @return \Apigee\Edge\Api\Management\Entity\AppInterface[] + * @return AppInterface[] * An array that can contain both developer- and appgroup app entities. */ public function listAppsByStatus( diff --git a/src/Api/ApigeeX/Controller/PaginationHelperTrait.php b/src/Api/ApigeeX/Controller/PaginationHelperTrait.php index 87fd0c153..976c9fd99 100644 --- a/src/Api/ApigeeX/Controller/PaginationHelperTrait.php +++ b/src/Api/ApigeeX/Controller/PaginationHelperTrait.php @@ -112,46 +112,45 @@ protected function listEntities(?PagerInterface $pager = null, array $query_para $responseArray = reset($responseArray); return $this->responseArrayToArrayOfEntities($responseArray, $key_provider); - } else { - // Default page size set to 1000, because the AppGroupApps endpoint - // does not return nextPageToken unless a pageSize is specified - // in the request parameters. - $pageSize = 1000; - // Pass an empty pager to load all entities. - $responseArray = $this->getResultsInRange($this->createPager($pageSize), $query_params); - // Check flag 'nextPageToken' to get next items from the list. - $nextPageToken = array_key_exists('nextPageToken', $responseArray) ? $responseArray['nextPageToken'] : false; - // Ignore entity type key from response, ex.: developer, apiproduct, - // etc. - $responseArray = reset($responseArray); - // Appgroup can be empty. - if (empty($responseArray) || !is_array($responseArray)) { - return []; - } - $entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider); - - if ($nextPageToken) { - do { - $tmp = $this->getResultsInRange($this->createPager($pageSize, $nextPageToken), $query_params); - // Check the flag 'nextPageToken' to get next items from the list. - $nextPageToken = array_key_exists('nextPageToken', $tmp) ? $tmp['nextPageToken'] : false; - // Ignore entity type key from response, ex.: developer, - // apiproduct, etc. - $tmp = reset($tmp); - // Remove the first item from the list because it is the same - // as the last item of $entities at this moment. - // Apigee X response always starts with the requested entity - // (pageToken). - array_shift($tmp); - $tmpEntities = $this->responseArrayToArrayOfEntities($tmp, $key_provider); - // The returned entity array is keyed by entity id which - // is unique so we can do this. - $entities += $tmpEntities; - } while ($nextPageToken); - } - - return $entities; } + // Default page size set to 1000, because the AppGroupApps endpoint + // does not return nextPageToken unless a pageSize is specified + // in the request parameters. + $pageSize = 1000; + // Pass an empty pager to load all entities. + $responseArray = $this->getResultsInRange($this->createPager($pageSize), $query_params); + // Check flag 'nextPageToken' to get next items from the list. + $nextPageToken = array_key_exists('nextPageToken', $responseArray) ? $responseArray['nextPageToken'] : false; + // Ignore entity type key from response, ex.: developer, apiproduct, + // etc. + $responseArray = reset($responseArray); + // Appgroup can be empty. + if (empty($responseArray) || !is_array($responseArray)) { + return []; + } + $entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider); + + if ($nextPageToken) { + do { + $tmp = $this->getResultsInRange($this->createPager($pageSize, $nextPageToken), $query_params); + // Check the flag 'nextPageToken' to get next items from the list. + $nextPageToken = array_key_exists('nextPageToken', $tmp) ? $tmp['nextPageToken'] : false; + // Ignore entity type key from response, ex.: developer, + // apiproduct, etc. + $tmp = reset($tmp); + // Remove the first item from the list because it is the same + // as the last item of $entities at this moment. + // Apigee X response always starts with the requested entity + // (pageToken). + array_shift($tmp); + $tmpEntities = $this->responseArrayToArrayOfEntities($tmp, $key_provider); + // The returned entity array is keyed by entity id which + // is unique so we can do this. + $entities += $tmpEntities; + } while ($nextPageToken); + } + + return $entities; } /** diff --git a/src/Api/ApigeeX/Controller/PrepaidBalanceController.php b/src/Api/ApigeeX/Controller/PrepaidBalanceController.php index bc0f81b47..1544107e9 100755 --- a/src/Api/ApigeeX/Controller/PrepaidBalanceController.php +++ b/src/Api/ApigeeX/Controller/PrepaidBalanceController.php @@ -118,7 +118,7 @@ abstract protected function getPrepaidBalanceEndpoint(): UriInterface; * * @param string|null $currencyCode * - * @return \Apigee\Edge\Api\ApigeeX\Entity\PrepaidBalanceInterface[] + * @return PrepaidBalanceInterface[] * * @psalm-suppress PossiblyNullArrayOffset - id() does not return null here. */ diff --git a/src/Api/ApigeeX/Controller/PrepaidBalanceControllerInterface.php b/src/Api/ApigeeX/Controller/PrepaidBalanceControllerInterface.php index a5637a23d..d5c362c05 100755 --- a/src/Api/ApigeeX/Controller/PrepaidBalanceControllerInterface.php +++ b/src/Api/ApigeeX/Controller/PrepaidBalanceControllerInterface.php @@ -37,7 +37,7 @@ public function topUpBalance($amount, $amountnano, string $currencyCode, string /** * Gets prepaid balances. * - * @return \Apigee\Edge\Api\ApigeeX\Entity\PrepaidBalanceInterface[] + * @return PrepaidBalanceInterface[] */ public function getPrepaidBalance(): array; } diff --git a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php index 9e34c66ca..12ea67a5f 100755 --- a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php +++ b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizer.php @@ -73,5 +73,5 @@ public function supportsDenormalization($data, $type, $format = null) } return RatePlanInterface::class === $type || $type instanceof RatePlanInterface || in_array(RatePlanInterface::class, class_implements($type) ?: []); -} + } } diff --git a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php index 0d32b03fb..f8fc9ff3e 100755 --- a/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php +++ b/src/Api/ApigeeX/Denormalizer/RatePlanDenormalizerFactory.php @@ -32,13 +32,13 @@ final class RatePlanDenormalizerFactory implements DenormalizerInterface, Serial setSerializer as private traitSetSerializer; } - /** @var \Symfony\Component\Serializer\Normalizer\DenormalizerInterface[] */ + /** @var DenormalizerInterface[] */ protected $denormalizers = []; /** * RatePlanDenormalizerFactory constructor. * - * @param \Symfony\Component\Serializer\Normalizer\DenormalizerInterface[] $denormalizers + * @param DenormalizerInterface[] $denormalizers */ public function __construct(array $denormalizers = []) { diff --git a/src/Api/ApigeeX/Entity/RatePlan.php b/src/Api/ApigeeX/Entity/RatePlan.php index 431889b7e..201cfd8cf 100755 --- a/src/Api/ApigeeX/Entity/RatePlan.php +++ b/src/Api/ApigeeX/Entity/RatePlan.php @@ -63,16 +63,16 @@ abstract class RatePlan extends Entity implements RatePlanInterface */ protected $package; - /** @var \Apigee\Edge\Api\ApigeeX\Structure\RatePlanXFee[] */ + /** @var RatePlanXFee[] */ protected $ratePlanXFee = []; - /** @var \Apigee\Edge\Api\ApigeeX\Structure\FixedRecurringFee[] */ + /** @var FixedRecurringFee[] */ protected $fixedRecurringFee = []; - /** @var \Apigee\Edge\Api\ApigeeX\Structure\ConsumptionPricingRate[] */ + /** @var ConsumptionPricingRate[] */ protected $consumptionPricingRates = []; - /** @var \Apigee\Edge\Api\ApigeeX\Structure\RevenueShareRates[] */ + /** @var RevenueShareRates[] */ protected $revenueShareRates = []; /** diff --git a/src/Api/ApigeeX/Entity/RatePlanInterface.php b/src/Api/ApigeeX/Entity/RatePlanInterface.php index 34d8e529c..16677ca78 100755 --- a/src/Api/ApigeeX/Entity/RatePlanInterface.php +++ b/src/Api/ApigeeX/Entity/RatePlanInterface.php @@ -68,7 +68,7 @@ public function getPackage(): ?ApiProductInterface; public function setPackage(ApiProductInterface $package): void; /** - * @return \Apigee\Edge\Api\ApigeeX\Structure\RatePlanXFee[] + * @return RatePlanXFee[] */ public function getRatePlanxFee(): array; @@ -78,7 +78,7 @@ public function getRatePlanxFee(): array; public function setRatePlanxFee(RatePlanXFee ...$ratePlanXFee): void; /** - * @return \Apigee\Edge\Api\ApigeeX\Structure\FixedRecurringFee[] + * @return FixedRecurringFee[] */ public function getFixedRecurringFee(): array; @@ -88,7 +88,7 @@ public function getFixedRecurringFee(): array; public function setFixedRecurringFee(FixedRecurringFee ...$fixedRecurringFee): void; /** - * @return \Apigee\Edge\Api\ApigeeX\Structure\ConsumptionPricingRate[] + * @return ConsumptionPricingRate[] */ public function getConsumptionPricingRates(): array; @@ -98,7 +98,7 @@ public function getConsumptionPricingRates(): array; public function setConsumptionPricingRates(ConsumptionPricingRate ...$consumptionPricingRates): void; /** - * @return \Apigee\Edge\Api\ApigeeX\Structure\RevenueShareRates[] + * @return RevenueShareRates[] */ public function getRevenueShareRates(): array; diff --git a/src/Api/ApigeeX/NameConverter/RatePlanNameConverter.php b/src/Api/ApigeeX/NameConverter/RatePlanNameConverter.php index 414c54180..90da3106a 100755 --- a/src/Api/ApigeeX/NameConverter/RatePlanNameConverter.php +++ b/src/Api/ApigeeX/NameConverter/RatePlanNameConverter.php @@ -25,6 +25,7 @@ * Maps rate plan properties from the API response to their destination properties. * * @see \Apigee\Edge\Api\ApigeeX\Entity\RatePlan + * * @psalm-suppress ClassMustBeFinal */ class RatePlanNameConverter extends NameConverterBase implements NameConverterInterface diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php index a54f15e6f..0770940d0 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php @@ -32,13 +32,13 @@ final class RatePlanNormalizerFactory implements NormalizerInterface, Serializer setSerializer as private traitSetSerializer; } - /** @var \Symfony\Component\Serializer\Normalizer\NormalizerInterface[] */ + /** @var NormalizerInterface[] */ protected $normalizers = []; /** * RatePlanDenormalizerFactory constructor. * - * @param \Symfony\Component\Serializer\Normalizer\NormalizerInterface[] $normalizers + * @param NormalizerInterface[] $normalizers */ public function __construct(array $normalizers = []) { diff --git a/src/Api/Management/Controller/AppControllerInterface.php b/src/Api/Management/Controller/AppControllerInterface.php index 0896bbc57..8f29f6bea 100644 --- a/src/Api/Management/Controller/AppControllerInterface.php +++ b/src/Api/Management/Controller/AppControllerInterface.php @@ -82,7 +82,7 @@ public function listAppIds(?PagerInterface $pager = null): array; * @param PagerInterface|null $pager * Number of results to return. * - * @return \Apigee\Edge\Api\Management\Entity\AppInterface[] + * @return AppInterface[] * An array that can contain both developer- and company app entities. */ public function listApps(bool $includeCredentials = false, ?PagerInterface $pager = null): array; @@ -110,7 +110,7 @@ public function listAppIdsByStatus(string $status, ?PagerInterface $pager = null * @param PagerInterface|null $pager * Number of results to return. * - * @return \Apigee\Edge\Api\Management\Entity\AppInterface[] + * @return AppInterface[] * An array that can contain both developer- and company app entities. */ public function listAppsByStatus( diff --git a/src/Api/Management/Controller/StatsController.php b/src/Api/Management/Controller/StatsController.php index eccc64314..6b5127d98 100644 --- a/src/Api/Management/Controller/StatsController.php +++ b/src/Api/Management/Controller/StatsController.php @@ -234,10 +234,10 @@ protected function getBaseEndpointUri(): UriInterface { if ($this->isHybrid()) { return $this->client->getUriFactory()->createUri("/organizations/{$this->organization}/environments/$this->environment/optimizedStats/"); - } else { - // Slash in the end is always required. - return $this->client->getUriFactory()->createUri("/organizations/{$this->organization}/environments/$this->environment/stats/"); } + + // Slash in the end is always required. + return $this->client->getUriFactory()->createUri("/organizations/{$this->organization}/environments/$this->environment/stats/"); } /** diff --git a/src/Api/Management/Entity/AppInterface.php b/src/Api/Management/Entity/AppInterface.php index 9e7a7bf24..ddfc36c81 100644 --- a/src/Api/Management/Entity/AppInterface.php +++ b/src/Api/Management/Entity/AppInterface.php @@ -80,7 +80,7 @@ public function getCallbackUrl(): ?string; public function setCallbackUrl(string $callbackUrl): void; /** - * @return \Apigee\Edge\Api\Management\Entity\AppCredentialInterface[] + * @return AppCredentialInterface[] */ public function getCredentials(): array; } diff --git a/src/Api/Monetization/Controller/AcceptedRatePlanController.php b/src/Api/Monetization/Controller/AcceptedRatePlanController.php index ce0a26367..d24c7590b 100644 --- a/src/Api/Monetization/Controller/AcceptedRatePlanController.php +++ b/src/Api/Monetization/Controller/AcceptedRatePlanController.php @@ -164,7 +164,7 @@ protected function alterRequestPayload(array &$payload, AcceptedRatePlanInterfac * @param array $query_params * Additional query parameters. * - * @return \Apigee\Edge\Api\Monetization\Entity\AcceptedRatePlanInterface[] + * @return AcceptedRatePlanInterface[] * * @psalm-suppress PossiblyNullArrayOffset - id() does not return null here. */ diff --git a/src/Api/Monetization/Controller/AcceptedRatePlanControllerInterface.php b/src/Api/Monetization/Controller/AcceptedRatePlanControllerInterface.php index c9d6eafbc..7bbcdada1 100644 --- a/src/Api/Monetization/Controller/AcceptedRatePlanControllerInterface.php +++ b/src/Api/Monetization/Controller/AcceptedRatePlanControllerInterface.php @@ -37,7 +37,7 @@ interface AcceptedRatePlanControllerInterface extends EntityControllerInterface, /** * Gets all accepted rate plans. * - * @return \Apigee\Edge\Api\Monetization\Entity\AcceptedRatePlanInterface[] + * @return AcceptedRatePlanInterface[] */ public function getAllAcceptedRatePlans(): array; @@ -47,7 +47,7 @@ public function getAllAcceptedRatePlans(): array; * @param int|null $limit * @param int $page * - * @return \Apigee\Edge\Api\Monetization\Entity\AcceptedRatePlanInterface[] + * @return AcceptedRatePlanInterface[] */ public function getPaginatedAcceptedRatePlanList(?int $limit = null, int $page = 1): array; diff --git a/src/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerInterface.php b/src/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerInterface.php index 1b2f571c9..0e0c89136 100644 --- a/src/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerInterface.php +++ b/src/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerInterface.php @@ -33,7 +33,7 @@ interface LegalEntityTermsAndConditionsControllerInterface extends OrganizationA * Gets all accepted/declined terms and conditions history events * for a developer -or company. * - * @return \Apigee\Edge\Api\Monetization\Structure\LegalEntityTermsAndConditionsHistoryItem[] + * @return LegalEntityTermsAndConditionsHistoryItem[] */ public function getTermsAndConditionsHistory(): array; @@ -42,7 +42,7 @@ public function getTermsAndConditionsHistory(): array; * * Specifying audit date is omitted at this moment. * - * @see \Apigee\Edge\Api\Monetization\Structure\LegalEntityTermsAndConditionsHistoryItem::$auditDate + * @see LegalEntityTermsAndConditionsHistoryItem::$auditDate * * @param string $tncId * Id of a terms and conditions. @@ -56,7 +56,7 @@ public function acceptTermsAndConditionsById(string $tncId): LegalEntityTermsAnd * * Specifying audit date is omitted at this moment. * - * @see \Apigee\Edge\Api\Monetization\Structure\LegalEntityTermsAndConditionsHistoryItem::$auditDate + * @see LegalEntityTermsAndConditionsHistoryItem::$auditDate * * @param string $tncId * Id of a terms and conditions. diff --git a/src/Api/Monetization/Controller/PrepaidBalanceController.php b/src/Api/Monetization/Controller/PrepaidBalanceController.php index 797a8c579..6fa99dd99 100644 --- a/src/Api/Monetization/Controller/PrepaidBalanceController.php +++ b/src/Api/Monetization/Controller/PrepaidBalanceController.php @@ -198,7 +198,7 @@ abstract protected function getPrepaidBalanceEndpoint(): UriInterface; * @param DateTimeImmutable $billingMonth * @param string|null $currencyCode * - * @return \Apigee\Edge\Api\Monetization\Entity\PrepaidBalanceInterface[] + * @return PrepaidBalanceInterface[] * * @psalm-suppress PossiblyNullArrayOffset - id() does not return null here. */ diff --git a/src/Api/Monetization/Controller/PrepaidBalanceControllerInterface.php b/src/Api/Monetization/Controller/PrepaidBalanceControllerInterface.php index 1f8859088..0a8cee94c 100644 --- a/src/Api/Monetization/Controller/PrepaidBalanceControllerInterface.php +++ b/src/Api/Monetization/Controller/PrepaidBalanceControllerInterface.php @@ -67,7 +67,7 @@ public function disableRecurringPayments(string $currencyCode, string $paymentPr * * @param DateTimeImmutable $billingMonth * - * @return \Apigee\Edge\Api\Monetization\Entity\PrepaidBalanceInterface[] + * @return PrepaidBalanceInterface[] */ public function getPrepaidBalance(DateTimeImmutable $billingMonth): array; diff --git a/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php b/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php index 59be70b31..9b07df54e 100644 --- a/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php +++ b/src/Api/Monetization/Denormalizer/LegalEntityDenormalizer.php @@ -68,9 +68,9 @@ public function denormalize($data, $type, $format = null, array $context = []) { if ($data->isCompany) { return parent::denormalize($data, $this->companyClass, $format, $context); - } else { - return parent::denormalize($data, $this->developerClass, $format, $context); } + + return parent::denormalize($data, $this->developerClass, $format, $context); } /** diff --git a/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php b/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php index 18fa7a6a8..8a1302492 100644 --- a/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php +++ b/src/Api/Monetization/Denormalizer/RatePlanDenormalizerFactory.php @@ -29,13 +29,13 @@ final class RatePlanDenormalizerFactory implements DenormalizerInterface, Serial setSerializer as private traitSetSerializer; } - /** @var \Symfony\Component\Serializer\Normalizer\DenormalizerInterface[] */ + /** @var DenormalizerInterface[] */ protected $denormalizers = []; /** * RatePlanDenormalizerFactory constructor. * - * @param \Symfony\Component\Serializer\Normalizer\DenormalizerInterface[] $denormalizers + * @param DenormalizerInterface[] $denormalizers */ public function __construct(array $denormalizers = []) { diff --git a/src/Api/Monetization/Entity/Property/AddressesPropertyAwareTrait.php b/src/Api/Monetization/Entity/Property/AddressesPropertyAwareTrait.php index 084f3aaf9..88562b7bb 100644 --- a/src/Api/Monetization/Entity/Property/AddressesPropertyAwareTrait.php +++ b/src/Api/Monetization/Entity/Property/AddressesPropertyAwareTrait.php @@ -27,13 +27,13 @@ */ trait AddressesPropertyAwareTrait { - /** @var \Apigee\Edge\Api\Monetization\Structure\Address[] */ + /** @var Address[] */ protected $addresses = []; /** * {@inheritdoc} * - * @return \Apigee\Edge\Api\Monetization\Structure\Address[] + * @return Address[] */ public function getAddresses(): array { diff --git a/src/Api/Monetization/Entity/Property/AddressesPropertyInterface.php b/src/Api/Monetization/Entity/Property/AddressesPropertyInterface.php index 948858569..643a729db 100644 --- a/src/Api/Monetization/Entity/Property/AddressesPropertyInterface.php +++ b/src/Api/Monetization/Entity/Property/AddressesPropertyInterface.php @@ -23,7 +23,7 @@ interface AddressesPropertyInterface { /** - * @return \Apigee\Edge\Api\Monetization\Structure\Address[] + * @return Address[] */ public function getAddresses(): array; diff --git a/src/Api/Monetization/Entity/Property/ApiProductsPropertyAwareTrait.php b/src/Api/Monetization/Entity/Property/ApiProductsPropertyAwareTrait.php index 788498c0b..4d6c0e651 100644 --- a/src/Api/Monetization/Entity/Property/ApiProductsPropertyAwareTrait.php +++ b/src/Api/Monetization/Entity/Property/ApiProductsPropertyAwareTrait.php @@ -33,7 +33,7 @@ trait ApiProductsPropertyAwareTrait /** * {@inheritdoc} * - * @return \Apigee\Edge\Api\Monetization\Entity\ApiProductInterface[] + * @return ApiProductInterface[] */ public function getApiProducts(): array { diff --git a/src/Api/Monetization/Entity/RatePlan.php b/src/Api/Monetization/Entity/RatePlan.php index d69328875..e1e9badb8 100644 --- a/src/Api/Monetization/Entity/RatePlan.php +++ b/src/Api/Monetization/Entity/RatePlan.php @@ -86,7 +86,7 @@ abstract class RatePlan extends OrganizationAwareEntity implements RatePlanInter /** @var bool */ protected $published = false; - /** @var \Apigee\Edge\Api\Monetization\Structure\RatePlanDetail[] */ + /** @var RatePlanDetail[] */ protected $ratePlanDetails = []; /** @var float|null */ diff --git a/src/Api/Monetization/Entity/RatePlanInterface.php b/src/Api/Monetization/Entity/RatePlanInterface.php index 7058c7b6e..054f3cada 100644 --- a/src/Api/Monetization/Entity/RatePlanInterface.php +++ b/src/Api/Monetization/Entity/RatePlanInterface.php @@ -160,7 +160,7 @@ public function isPublished(): bool; public function setPublished(bool $published): void; /** - * @return \Apigee\Edge\Api\Monetization\Structure\RatePlanDetail[] + * @return RatePlanDetail[] */ public function getRatePlanDetails(): array; diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php index 1f8523891..65e11f349 100644 --- a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php @@ -29,13 +29,13 @@ final class RatePlanNormalizerFactory implements NormalizerInterface, Serializer setSerializer as private traitSetSerializer; } - /** @var \Symfony\Component\Serializer\Normalizer\NormalizerInterface[] */ + /** @var NormalizerInterface[] */ protected $normalizers = []; /** * RatePlanDenormalizerFactory constructor. * - * @param \Symfony\Component\Serializer\Normalizer\NormalizerInterface[] $normalizers + * @param NormalizerInterface[] $normalizers */ public function __construct(array $normalizers = []) { diff --git a/src/Api/Monetization/Structure/RatePlanDetail.php b/src/Api/Monetization/Structure/RatePlanDetail.php index 7c001bd89..c3fc9473b 100644 --- a/src/Api/Monetization/Structure/RatePlanDetail.php +++ b/src/Api/Monetization/Structure/RatePlanDetail.php @@ -103,7 +103,7 @@ final class RatePlanDetail extends BaseObject implements /** @var string */ private $meteringType; - /** @var \Apigee\Edge\Api\Monetization\Structure\RatePlanRate[] */ + /** @var RatePlanRate[] */ private $ratePlanRates = []; /** @var string */ @@ -199,7 +199,7 @@ public function setMeteringType(string $meteringType): void } /** - * @return \Apigee\Edge\Api\Monetization\Structure\RatePlanRate[] + * @return RatePlanRate[] */ public function getRatePlanRates(): array { diff --git a/src/Controller/PaginationHelperTrait.php b/src/Controller/PaginationHelperTrait.php index db6705447..1f1fb090e 100644 --- a/src/Controller/PaginationHelperTrait.php +++ b/src/Controller/PaginationHelperTrait.php @@ -111,11 +111,10 @@ protected function listEntities(?PagerInterface $pager = null, array $query_para if (OrganizationFeatures::isPaginationAvailable($organization)) { return $this->listEntitiesWithCps($pager, $query_params, $key_provider); - } else { - $this->triggerCpsSimulationNotice($pager); - - return $this->listEntitiesWithoutCps($pager, $query_params, $key_provider); } + $this->triggerCpsSimulationNotice($pager); + + return $this->listEntitiesWithoutCps($pager, $query_params, $key_provider); } /** @@ -136,11 +135,10 @@ protected function listEntityIds(?PagerInterface $pager = null, array $query_par if (OrganizationFeatures::isCpsEnabled($organization)) { return $this->listEntityIdsWithCps($pager, $query_params); - } else { - $this->triggerCpsSimulationNotice($pager); - - return $this->listEntityIdsWithoutCps($pager, $query_params); } + $this->triggerCpsSimulationNotice($pager); + + return $this->listEntityIdsWithoutCps($pager, $query_params); } /** @@ -181,43 +179,42 @@ private function listEntitiesWithCps(?PagerInterface $pager = null, array $query $responseArray = reset($responseArray) ?: []; return $this->responseArrayToArrayOfEntities($responseArray, $key_provider); - } else { - // Pass an empty pager to load all entities. - $responseArray = $this->getResultsInRange($this->createPager(), $query_params); - // Ignore entity type key from response, ex.: developer, apiproduct, - // etc. - $responseArray = reset($responseArray) ?: []; - if (empty($responseArray)) { - return []; - } - $entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider); - $lastEntity = end($entities); - $lastId = $lastEntity->{$key_provider}(); - do { - $tmp = $this->getResultsInRange($this->createPager(0, $lastId), $query_params); - // Ignore entity type key from response, ex.: developer, - // apiproduct, etc. - $tmp = reset($tmp) ?: []; - // Remove the first item from the list because it is the same - // as the last item of $entities at this moment. - // Apigee Edge response always starts with the requested entity - // (startKey). - array_shift($tmp); - $tmpEntities = $this->responseArrayToArrayOfEntities((array) $tmp, $key_provider); - - if (count($tmpEntities) > 0) { - // The returned entity array is keyed by entity id which - // is unique so we can do this. - $entities += $tmpEntities; - $lastEntity = end($tmpEntities); - $lastId = $lastEntity->{$key_provider}(); - } else { - $lastId = false; - } - } while ($lastId); - - return $entities; } + // Pass an empty pager to load all entities. + $responseArray = $this->getResultsInRange($this->createPager(), $query_params); + // Ignore entity type key from response, ex.: developer, apiproduct, + // etc. + $responseArray = reset($responseArray) ?: []; + if (empty($responseArray)) { + return []; + } + $entities = $this->responseArrayToArrayOfEntities($responseArray, $key_provider); + $lastEntity = end($entities); + $lastId = $lastEntity->{$key_provider}(); + do { + $tmp = $this->getResultsInRange($this->createPager(0, $lastId), $query_params); + // Ignore entity type key from response, ex.: developer, + // apiproduct, etc. + $tmp = reset($tmp) ?: []; + // Remove the first item from the list because it is the same + // as the last item of $entities at this moment. + // Apigee Edge response always starts with the requested entity + // (startKey). + array_shift($tmp); + $tmpEntities = $this->responseArrayToArrayOfEntities((array) $tmp, $key_provider); + + if (count($tmpEntities) > 0) { + // The returned entity array is keyed by entity id which + // is unique so we can do this. + $entities += $tmpEntities; + $lastEntity = end($tmpEntities); + $lastId = $lastEntity->{$key_provider}(); + } else { + $lastId = false; + } + } while ($lastId); + + return $entities; } /** @@ -322,30 +319,29 @@ private function listEntityIdsWithCps(?PagerInterface $pager = null, array $quer $expandCompatibility = str_ends_with($this->getClient()->getEndpoint(), $baseDomain); if ($pager) { return $this->getResultsInRange($pager, $query_params, $expandCompatibility); - } else { - $ids = $this->getResultsInRange($this->createPager(), $query_params, $expandCompatibility); - if (empty($ids)) { - return []; - } - $lastId = end($ids); - do { - $tmp = $this->getResultsInRange($this->createPager(0, $lastId), $query_params, $expandCompatibility); - // Remove the first item from the list because it is the same - // as the current last item of $ids. - // Apigee Edge response always starts with the requested entity - // id (startKey). - array_shift($tmp); - - if (count($tmp) > 0) { - $ids = array_merge($ids, $tmp); - $lastId = end($tmp); - } else { - $lastId = false; - } - } while ($lastId); - - return $ids; } + $ids = $this->getResultsInRange($this->createPager(), $query_params, $expandCompatibility); + if (empty($ids)) { + return []; + } + $lastId = end($ids); + do { + $tmp = $this->getResultsInRange($this->createPager(0, $lastId), $query_params, $expandCompatibility); + // Remove the first item from the list because it is the same + // as the current last item of $ids. + // Apigee Edge response always starts with the requested entity + // id (startKey). + array_shift($tmp); + + if (count($tmp) > 0) { + $ids = array_merge($ids, $tmp); + $lastId = end($tmp); + } else { + $lastId = false; + } + } while ($lastId); + + return $ids; } /** diff --git a/src/HttpClient/Plugin/Authentication/ApigeeOnGcpOauth2.php b/src/HttpClient/Plugin/Authentication/ApigeeOnGcpOauth2.php index 3a5de81ed..f5e30cf53 100644 --- a/src/HttpClient/Plugin/Authentication/ApigeeOnGcpOauth2.php +++ b/src/HttpClient/Plugin/Authentication/ApigeeOnGcpOauth2.php @@ -29,6 +29,7 @@ * ApigeeOnGcpOauth2 authentication plugin for authenticating to GCP API. * * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount + * * @psalm-suppress ClassMustBeFinal */ class ApigeeOnGcpOauth2 extends AbstractOauth diff --git a/src/HttpClient/Plugin/Authentication/HybridOauth2.php b/src/HttpClient/Plugin/Authentication/HybridOauth2.php index 452c81ae1..5e7c9f629 100644 --- a/src/HttpClient/Plugin/Authentication/HybridOauth2.php +++ b/src/HttpClient/Plugin/Authentication/HybridOauth2.php @@ -31,6 +31,7 @@ * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount * @deprecated in 2.0.9, will be removed in 3.0.0. * https://github.com/apigee/apigee-client-php/issues/112 + * * @psalm-suppress ClassMustBeFinal */ class HybridOauth2 extends AbstractOauth diff --git a/src/HttpClient/Utility/Builder.php b/src/HttpClient/Utility/Builder.php index 306edc418..b89d2e9ce 100644 --- a/src/HttpClient/Utility/Builder.php +++ b/src/HttpClient/Utility/Builder.php @@ -45,7 +45,7 @@ final class Builder implements BuilderInterface /** * Http client plugins. * - * @var \Http\Client\Common\Plugin[] + * @var Plugin[] */ private $plugins = []; diff --git a/src/Structure/KeyValueMapInterface.php b/src/Structure/KeyValueMapInterface.php index e5ee22dc1..e6f6c1685 100644 --- a/src/Structure/KeyValueMapInterface.php +++ b/src/Structure/KeyValueMapInterface.php @@ -23,7 +23,7 @@ /** * Interface KeyValueMapInterface. * - * @extends \IteratorAggregate + * @extends IteratorAggregate */ interface KeyValueMapInterface extends IteratorAggregate { diff --git a/tests/Api/ApigeeX/Controller/PaginatedEntityListingControllerTestTraitBase.php b/tests/Api/ApigeeX/Controller/PaginatedEntityListingControllerTestTraitBase.php index 6e025ff37..aa70e8c5f 100644 --- a/tests/Api/ApigeeX/Controller/PaginatedEntityListingControllerTestTraitBase.php +++ b/tests/Api/ApigeeX/Controller/PaginatedEntityListingControllerTestTraitBase.php @@ -33,7 +33,7 @@ trait PaginatedEntityListingControllerTestTraitBase * @param string $entityIdPrefix * Random entity id prefix for this test. * - * @return \Apigee\Edge\Entity\EntityInterface[] + * @return EntityInterface[] */ protected function setupForPaginatedEntityListingTest(string $entityIdPrefix): array { diff --git a/tests/Api/Management/Controller/PaginatedEntityIdListingControllerTestTrait.php b/tests/Api/Management/Controller/PaginatedEntityIdListingControllerTestTrait.php index 45dd8c0b9..02689fad1 100644 --- a/tests/Api/Management/Controller/PaginatedEntityIdListingControllerTestTrait.php +++ b/tests/Api/Management/Controller/PaginatedEntityIdListingControllerTestTrait.php @@ -44,7 +44,7 @@ public function testPaginatedEntityIdListing(): void $entityIds = $this->controllerForPaginatedEntityIdListing()->getEntityIds(); } - /** @var \Apigee\Edge\Entity\EntityInterface[] $tmp */ + /** @var EntityInterface[] $tmp */ $tmp = $entityIds; // Get the 4th item from the list. array_shift($tmp); diff --git a/tests/Api/Management/Controller/PaginatedEntityListingControllerTestTraitBase.php b/tests/Api/Management/Controller/PaginatedEntityListingControllerTestTraitBase.php index c96afa173..d9a2b98cc 100644 --- a/tests/Api/Management/Controller/PaginatedEntityListingControllerTestTraitBase.php +++ b/tests/Api/Management/Controller/PaginatedEntityListingControllerTestTraitBase.php @@ -33,7 +33,7 @@ trait PaginatedEntityListingControllerTestTraitBase * @param string $entityIdPrefix * Random entity id prefix for this test. * - * @return \Apigee\Edge\Entity\EntityInterface[] + * @return EntityInterface[] */ protected function setupForPaginatedEntityListingTest(string $entityIdPrefix): array { diff --git a/tests/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerTestBase.php b/tests/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerTestBase.php index f45dda1a6..c0e655d16 100644 --- a/tests/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerTestBase.php +++ b/tests/Api/Monetization/Controller/LegalEntityTermsAndConditionsControllerTestBase.php @@ -38,7 +38,7 @@ public function testGetTermsAndConditionsHistory(): void { /** @var \Apigee\Edge\Api\Monetization\Controller\LegalEntityTermsAndConditionsControllerInterface $controller */ $controller = static::entityController(); - /** @var \Apigee\Edge\Api\Monetization\Structure\LegalEntityTermsAndConditionsHistoryItem[] $entities */ + /** @var LegalEntityTermsAndConditionsHistoryItem[] $entities */ $entities = $controller->getTermsAndConditionsHistory(); $json = json_decode((string) static::defaultAPIClient()->getJournal()->getLastResponse()->getBody()); $json = reset($json); diff --git a/tests/PropertyAccess/PropertyAccessorDecoratorTest.php b/tests/PropertyAccess/PropertyAccessorDecoratorTest.php index 6d41d85bb..910e39064 100644 --- a/tests/PropertyAccess/PropertyAccessorDecoratorTest.php +++ b/tests/PropertyAccess/PropertyAccessorDecoratorTest.php @@ -196,12 +196,12 @@ public function exceptionsToGetOnGetValue(): array $shouldBeAString, ['shouldBeAString', UnexpectedValueException::class, '/Invalid value returned for shouldBeAString property on instance of class@anonymous.* class. Expected type "string", got "stdClass".$/'], ]; - } else { - return [ - $shouldBeAString, - ['shouldBeAString', TypeError::class, '/Return value must be of type string, stdClass returned/'], - ]; } + + return [ + $shouldBeAString, + ['shouldBeAString', TypeError::class, '/Return value must be of type string, stdClass returned/'], + ]; } public function exceptionsToGetOnSetValue(): array @@ -211,10 +211,10 @@ public function exceptionsToGetOnSetValue(): array return [ ['shouldBeAStringArray', [null], InvalidArgumentException::class, '/^Expected argument of type "string", "null" given/'], ]; - } else { - return [ - ['shouldBeAStringArray', [null], TypeError::class, '/Argument #1 must be of type string, null given/'], - ]; } + + return [ + ['shouldBeAStringArray', [null], TypeError::class, '/Argument #1 must be of type string, null given/'], + ]; } } diff --git a/tests/Test/Entity/MockEntity.php b/tests/Test/Entity/MockEntity.php index e40f0c047..03b3ab7fe 100644 --- a/tests/Test/Entity/MockEntity.php +++ b/tests/Test/Entity/MockEntity.php @@ -65,7 +65,7 @@ class MockEntity extends Entity /** @var string */ private $emptyString = ''; - /** @var \Apigee\Edge\Api\Management\Entity\AppCredential[] */ + /** @var AppCredential[] */ private $appCredential = []; /** @var CredentialProduct */ @@ -236,7 +236,7 @@ public function setCredentialProduct(CredentialProduct $credentialProduct): void } /** - * @return \Apigee\Edge\Api\Management\Entity\AppCredential[] + * @return AppCredential[] */ public function getAppCredential(): array { @@ -244,7 +244,7 @@ public function getAppCredential(): array } /** - * @param \Apigee\Edge\Api\Management\Entity\AppCredential[] $appCredential + * @param AppCredential[] $appCredential */ public function setAppCredential(array $appCredential): void { diff --git a/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorInterface.php b/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorInterface.php index 2394d3068..c95d287c5 100644 --- a/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorInterface.php +++ b/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorInterface.php @@ -23,7 +23,7 @@ interface PropertyValidatorsAwareValidatorInterface /** * Set property validators. * - * @param \Apigee\Edge\Tests\Test\EntitySerializer\PropertyValidator\PropertyValidatorInterface[] $validators + * @param PropertyValidatorInterface[] $validators */ public function setPropertyValidators(array $validators): void; } diff --git a/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorTrait.php b/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorTrait.php index 18f1a310b..6117048d3 100644 --- a/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorTrait.php +++ b/tests/Test/EntitySerializer/PropertyValidator/PropertyValidatorsAwareValidatorTrait.php @@ -30,11 +30,11 @@ */ trait PropertyValidatorsAwareValidatorTrait { - /** @var \Apigee\Edge\Tests\Test\EntitySerializer\PropertyValidator\PropertyValidatorInterface[] */ + /** @var PropertyValidatorInterface[] */ protected $propertyValidators = []; /** - * @param \Apigee\Edge\Tests\Test\EntitySerializer\PropertyValidator\PropertyValidatorInterface[] $propertyValidators + * @param PropertyValidatorInterface[] $propertyValidators */ public function setPropertyValidators(array $propertyValidators): void { diff --git a/tests/Test/TestClientFactory.php b/tests/Test/TestClientFactory.php index 89a917928..f90e9c6ec 100644 --- a/tests/Test/TestClientFactory.php +++ b/tests/Test/TestClientFactory.php @@ -35,7 +35,7 @@ */ class TestClientFactory { - /** @var \Apigee\Edge\ClientInterface[] */ + /** @var ClientInterface[] */ private static $instances = []; /** diff --git a/tests/Test/Utility/EntityStorage.php b/tests/Test/Utility/EntityStorage.php index 47c2c1ab4..8439cc35d 100644 --- a/tests/Test/Utility/EntityStorage.php +++ b/tests/Test/Utility/EntityStorage.php @@ -42,7 +42,7 @@ final class EntityStorage /** @var object[] */ private static $controllers = []; - /** @var \Apigee\Edge\Entity\EntityInterface[] */ + /** @var EntityInterface[] */ private static $createdEntities = []; /** @@ -100,7 +100,7 @@ public function removeEntity(string $entityId, $controller): void /** * @param object $controller * - * @return \Apigee\Edge\Entity\EntityInterface[] + * @return EntityInterface[] */ public function getCreatedEntitiesByStorage($controller): array { From 1eea59fdb34b05219400cf7f88bf092059d5427c Mon Sep 17 00:00:00 2001 From: shailesh-google Date: Thu, 7 May 2026 14:32:42 +0530 Subject: [PATCH 4/5] removed the final class and supressed final class due to apigee edge module error --- src/HttpClient/Plugin/Authentication/GceServiceAccount.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/HttpClient/Plugin/Authentication/GceServiceAccount.php b/src/HttpClient/Plugin/Authentication/GceServiceAccount.php index 275798a23..ab5bdf6e6 100644 --- a/src/HttpClient/Plugin/Authentication/GceServiceAccount.php +++ b/src/HttpClient/Plugin/Authentication/GceServiceAccount.php @@ -30,8 +30,10 @@ * Cloud API. * * @see https://developers.google.com/identity/protocols/OAuth2ServiceAccount + * + * @psalm-suppress ClassMustBeFinal */ -final class GceServiceAccount extends AbstractOauth +class GceServiceAccount extends AbstractOauth { public const DEFAULT_GCE_AUTH_SERVER = 'http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token'; From 430fd0f06f36d6ba2659a28cc05dc08c1883989b Mon Sep 17 00:00:00 2001 From: shailesh-google Date: Fri, 8 May 2026 14:56:34 +0530 Subject: [PATCH 5/5] psalm supressed final class due to apigee m10n error --- src/Api/Monetization/Entity/SupportedCurrency.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Api/Monetization/Entity/SupportedCurrency.php b/src/Api/Monetization/Entity/SupportedCurrency.php index 521763431..8273e56dc 100644 --- a/src/Api/Monetization/Entity/SupportedCurrency.php +++ b/src/Api/Monetization/Entity/SupportedCurrency.php @@ -24,7 +24,10 @@ use Apigee\Edge\Entity\Property\NamePropertyAwareTrait; use Apigee\Edge\Entity\Property\StatusPropertyAwareTrait; -final class SupportedCurrency extends OrganizationAwareEntity implements SupportedCurrencyInterface +/** + * @psalm-suppress ClassMustBeFinal + */ +class SupportedCurrency extends OrganizationAwareEntity implements SupportedCurrencyInterface { use DescriptionPropertyAwareTrait; use DisplayNamePropertyAwareTrait;