From 2a2d499525cd0b2a5efdaf029292d36c36b077dd Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Tue, 15 Oct 2024 17:46:06 +0530 Subject: [PATCH] PHPCS fixes --- src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/AppNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php | 3 ++- src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php | 3 ++- src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php | 3 ++- src/Api/Management/Normalizer/AppCredentialNormalizer.php | 3 ++- src/Api/Management/Normalizer/AppNormalizer.php | 3 ++- src/Api/Management/Normalizer/CompanyMembershipNormalizer.php | 2 +- src/Api/Management/Query/StatsQueryNormalizer.php | 3 ++- .../Monetization/Normalizer/AcceptedRatePlanNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/ApiPackageNormalizer.php | 3 ++- .../Normalizer/CompanyPaymentTransactionNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php | 3 ++- .../Normalizer/DeveloperCategoryRatePlanNormalizer.php | 3 ++- .../Normalizer/DeveloperPaymentTransactionNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/EntityNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/LegalEntityNormalizer.php | 3 ++- .../Monetization/Normalizer/LegalEntityRatePlanNormalizer.php | 3 ++- .../Normalizer/LegalEntityReportDefinitionNormalizer.php | 4 +++- src/Api/Monetization/Normalizer/RatePlanNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php | 3 ++- src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php | 3 ++- src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php | 3 ++- .../Monetization/Normalizer/ReportDefinitionNormalizer.php | 3 ++- .../Monetization/Normalizer/StandardRatePlanNormalizer.php | 3 ++- .../Monetization/Normalizer/TermsAndConditionsNormalizer.php | 3 ++- src/Normalizer/CredentialProductNormalizer.php | 2 +- src/Normalizer/EdgeDateNormalizer.php | 3 ++- src/Normalizer/KeyValueMapNormalizer.php | 3 ++- src/Normalizer/ObjectNormalizer.php | 2 +- src/Normalizer/PropertiesPropertyNormalizer.php | 2 +- src/Serializer/EntitySerializer.php | 3 ++- 36 files changed, 69 insertions(+), 36 deletions(-) diff --git a/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php index f3b7e27b..0b48ca33 100755 --- a/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\AcceptedRatePlanInterface; use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; +use ArrayObject; class AcceptedRatePlanNormalizer extends EntityNormalizer { @@ -32,7 +33,7 @@ class AcceptedRatePlanNormalizer extends EntityNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var AcceptedRatePlanInterface $object */ /** @var object $normalized */ diff --git a/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php b/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php index 84d53294..2f8d9ed2 100755 --- a/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\ApiProductInterface; use Apigee\Edge\Api\Monetization\NameConverter\ApiPackageNameConverter; use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -48,7 +49,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php b/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php index 7c10d2cd..49ecc403 100644 --- a/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Api\ApigeeX\Normalizer; use Apigee\Edge\Api\ApigeeX\Structure\AppGroupMembership; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class AppGroupMembershipNormalizer implements NormalizerInterface @@ -29,7 +30,7 @@ class AppGroupMembershipNormalizer implements NormalizerInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $normalized = []; diff --git a/src/Api/ApigeeX/Normalizer/AppNormalizer.php b/src/Api/ApigeeX/Normalizer/AppNormalizer.php index 5bbbf7cb..649c925b 100644 --- a/src/Api/ApigeeX/Normalizer/AppNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AppNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Management\Entity\AppInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -41,7 +42,7 @@ public function supportsNormalization($data, $format = null) * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php b/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php index a883f01e..212eaca4 100644 --- a/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\BillingTypeInterface; use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; +use ArrayObject; class BillingTypeNormalizer extends EntityNormalizer { @@ -29,7 +30,7 @@ class BillingTypeNormalizer extends EntityNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var BillingTypeInterface $object */ /** @var object $normalized */ diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php index 54564552..7aae5d2f 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php @@ -23,6 +23,7 @@ use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; use Apigee\Edge\Exception\UninitializedPropertyException; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -52,7 +53,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php index dc5dee7a..82aa8a94 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\Monetization\Normalizer\CompanyRatePlanNormalizer; use Apigee\Edge\Api\Monetization\Normalizer\DeveloperCategoryRatePlanNormalizer; use Apigee\Edge\Api\Monetization\Normalizer\DeveloperRatePlanNormalizer; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; use Symfony\Component\Serializer\SerializerAwareTrait; @@ -56,7 +57,7 @@ public function __construct(array $normalizers = []) * @psalm-suppress InvalidNullableReturnType - There are going to be at * least one normalizer always that can normalize data here. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { foreach ($this->normalizers as $normalizer) { // Return the result from the first denormalizer that can diff --git a/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php b/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php index ae045207..8049388f 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\Monetization\Structure\RatePlanRate; use Apigee\Edge\Api\Monetization\Structure\RatePlanRateRevShare; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; class RatePlanRateNormalizer extends ObjectNormalizer { @@ -30,7 +31,7 @@ class RatePlanRateNormalizer extends ObjectNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php index 55f49fec..cf796a58 100755 --- a/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\ApigeeX\Entity\RatePlanInterface; use Apigee\Edge\Api\ApigeeX\Entity\StandardRatePlanInterface; +use ArrayObject; class StandardRatePlanNormalizer extends RatePlanNormalizer { @@ -29,7 +30,7 @@ class StandardRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Management/Normalizer/AppCredentialNormalizer.php b/src/Api/Management/Normalizer/AppCredentialNormalizer.php index f1dd5788..8cc96833 100644 --- a/src/Api/Management/Normalizer/AppCredentialNormalizer.php +++ b/src/Api/Management/Normalizer/AppCredentialNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Management\Entity\AppCredentialInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -41,7 +42,7 @@ public function supportsNormalization($data, $format = null) * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Management/Normalizer/AppNormalizer.php b/src/Api/Management/Normalizer/AppNormalizer.php index 9f6eb771..635e7191 100644 --- a/src/Api/Management/Normalizer/AppNormalizer.php +++ b/src/Api/Management/Normalizer/AppNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Management\Entity\AppInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -41,7 +42,7 @@ public function supportsNormalization($data, $format = null) * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php b/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php index 4e6c3150..97f7f7cc 100644 --- a/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php +++ b/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php @@ -30,7 +30,7 @@ class CompanyMembershipNormalizer implements NormalizerInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $normalized = [ 'developer' => [], diff --git a/src/Api/Management/Query/StatsQueryNormalizer.php b/src/Api/Management/Query/StatsQueryNormalizer.php index 07e66b36..083ac2df 100644 --- a/src/Api/Management/Query/StatsQueryNormalizer.php +++ b/src/Api/Management/Query/StatsQueryNormalizer.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Api\Management\Query; use Apigee\Edge\Serializer\JsonEncoder; +use ArrayObject; use DateTimeZone; use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -52,7 +53,7 @@ public function __construct() /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var StatsQueryInterface $object */ // Transform the object to JSON and back to an array to keep boolean values as boolean. diff --git a/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php index f0226d31..569967fe 100644 --- a/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\AcceptedRatePlanInterface; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; +use ArrayObject; class AcceptedRatePlanNormalizer extends EntityNormalizer { @@ -31,7 +32,7 @@ class AcceptedRatePlanNormalizer extends EntityNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var AcceptedRatePlanInterface $object */ /** @var object $normalized */ diff --git a/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php b/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php index d01441b1..53fe1454 100644 --- a/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php +++ b/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\ApiPackageInterface; use Apigee\Edge\Api\Monetization\NameConverter\ApiPackageNameConverter; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -47,7 +48,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $normalized = (array) parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php index d1fad4de..335b2ee1 100644 --- a/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\NameConverter\CompanyRatePlanNameConverter; use Apigee\Edge\Api\Monetization\Structure\CompanyPaymentTransaction; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -47,7 +48,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php b/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php index e6c3cc42..165cede8 100644 --- a/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php +++ b/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php @@ -18,6 +18,7 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; +use ArrayObject; use DateTimeZone; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -26,7 +27,7 @@ class DateTimeZoneNormalizer implements NormalizerInterface /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { return $object->getName(); } diff --git a/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php index 5543ccf7..417a08bf 100644 --- a/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperCategoryRatePlanInterface; use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; +use ArrayObject; class DeveloperCategoryRatePlanNormalizer extends RatePlanNormalizer { @@ -29,7 +30,7 @@ class DeveloperCategoryRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php index bb35ca89..a7e0bf94 100644 --- a/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; use Apigee\Edge\Api\Monetization\Structure\DeveloperPaymentTransaction; +use ArrayObject; class DeveloperPaymentTransactionNormalizer extends PaymentTransactionNormalizer { @@ -28,7 +29,7 @@ class DeveloperPaymentTransactionNormalizer extends PaymentTransactionNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/EntityNormalizer.php b/src/Api/Monetization/Normalizer/EntityNormalizer.php index 0f7a8175..ff1584df 100644 --- a/src/Api/Monetization/Normalizer/EntityNormalizer.php +++ b/src/Api/Monetization/Normalizer/EntityNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\Structure\NestedObjectReferenceInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use ReflectionObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; @@ -63,7 +64,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType stdClass is also an object. * @psalm-suppress InvalidPropertyFetch. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $normalized = (array) parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php index a19aaa72..8c1519c1 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php @@ -22,6 +22,7 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperInterface; use Apigee\Edge\Api\Monetization\Entity\LegalEntityInterface; use Apigee\Edge\Api\Monetization\NameConverter\LegalEntityNameConvert; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -49,7 +50,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php index bae1a783..0fe3c49f 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; +use ArrayObject; abstract class LegalEntityRatePlanNormalizer extends RatePlanNormalizer { @@ -28,7 +29,7 @@ abstract class LegalEntityRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php index ebc5da08..2790aca3 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php @@ -18,6 +18,8 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; +use ArrayObject; + abstract class LegalEntityReportDefinitionNormalizer extends ReportDefinitionNormalizer { /** @@ -26,7 +28,7 @@ abstract class LegalEntityReportDefinitionNormalizer extends ReportDefinitionNor * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizer.php b/src/Api/Monetization/Normalizer/RatePlanNormalizer.php index 4dc96ee6..240a7a56 100644 --- a/src/Api/Monetization/Normalizer/RatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/RatePlanNormalizer.php @@ -22,6 +22,7 @@ use Apigee\Edge\Api\Monetization\NameConverter\RatePlanNameConverter; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; use Apigee\Edge\Exception\UninitializedPropertyException; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -51,7 +52,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php index 216ea4b8..69dff853 100644 --- a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php @@ -18,6 +18,7 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; use Symfony\Component\Serializer\SerializerAwareTrait; @@ -53,7 +54,7 @@ public function __construct(array $normalizers = []) * @psalm-suppress InvalidNullableReturnType - There are going to be at * least one normalizer always that can normalize data here. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { foreach ($this->normalizers as $normalizer) { // Return the result from the first denormalizer that can diff --git a/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php b/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php index 3058eff1..d4324550 100644 --- a/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php +++ b/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\Monetization\Structure\RatePlanRate; use Apigee\Edge\Api\Monetization\Structure\RatePlanRateRevShare; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; class RatePlanRateNormalizer extends ObjectNormalizer { @@ -30,7 +31,7 @@ class RatePlanRateNormalizer extends ObjectNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php b/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php index 4825b543..46a0c440 100644 --- a/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php +++ b/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php @@ -22,6 +22,7 @@ use Apigee\Edge\Api\Monetization\Structure\Reports\Criteria\AbstractCriteria; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use DateTimeZone; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; @@ -59,7 +60,7 @@ public function __construct(string $organization, ?ClassMetadataFactoryInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php index 6829479f..42be4c41 100644 --- a/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php @@ -21,6 +21,7 @@ use Apigee\Edge\Api\Monetization\Entity\ReportDefinitionInterface; use Apigee\Edge\Api\Monetization\NameConverter\ReportDefinitionNameConverter; use Apigee\Edge\Api\Monetization\Utility\ReportTypeFromCriteriaHelperTrait; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -50,7 +51,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var ReportDefinitionInterface $object */ /** @var object $normalized */ diff --git a/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php index b6f5b625..643210a1 100644 --- a/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php @@ -20,6 +20,7 @@ use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; use Apigee\Edge\Api\Monetization\Entity\StandardRatePlanInterface; +use ArrayObject; class StandardRatePlanNormalizer extends RatePlanNormalizer { @@ -29,7 +30,7 @@ class StandardRatePlanNormalizer extends RatePlanNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php b/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php index 5721f84b..a0791114 100644 --- a/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php +++ b/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php @@ -22,6 +22,7 @@ use Apigee\Edge\Api\Monetization\NameConverter\TermsAndConditionsNameConverter; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; use Apigee\Edge\Exception\UninitializedPropertyException; +use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface; use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface; @@ -51,7 +52,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); diff --git a/src/Normalizer/CredentialProductNormalizer.php b/src/Normalizer/CredentialProductNormalizer.php index 060ce86e..a7d293a1 100644 --- a/src/Normalizer/CredentialProductNormalizer.php +++ b/src/Normalizer/CredentialProductNormalizer.php @@ -33,7 +33,7 @@ class CredentialProductNormalizer implements NormalizerInterface * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /* @var \Apigee\Edge\Structure\CredentialProductInterface $object */ $asObject = [ diff --git a/src/Normalizer/EdgeDateNormalizer.php b/src/Normalizer/EdgeDateNormalizer.php index dcd95924..45b1f028 100644 --- a/src/Normalizer/EdgeDateNormalizer.php +++ b/src/Normalizer/EdgeDateNormalizer.php @@ -18,6 +18,7 @@ namespace Apigee\Edge\Normalizer; +use ArrayObject; use DateTimeInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -34,7 +35,7 @@ public function supportsNormalization($data, $format = null) /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { /* @var \DateTimeInterface $object */ return $object->getTimestamp() * 1000; diff --git a/src/Normalizer/KeyValueMapNormalizer.php b/src/Normalizer/KeyValueMapNormalizer.php index b11e9a3b..4f2fa86c 100644 --- a/src/Normalizer/KeyValueMapNormalizer.php +++ b/src/Normalizer/KeyValueMapNormalizer.php @@ -19,6 +19,7 @@ namespace Apigee\Edge\Normalizer; use Apigee\Edge\Structure\KeyValueMapInterface; +use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -29,7 +30,7 @@ class KeyValueMapNormalizer implements NormalizerInterface /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $return = []; foreach ($object->values() as $key => $value) { diff --git a/src/Normalizer/ObjectNormalizer.php b/src/Normalizer/ObjectNormalizer.php index 587a59e3..103843ce 100644 --- a/src/Normalizer/ObjectNormalizer.php +++ b/src/Normalizer/ObjectNormalizer.php @@ -94,7 +94,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory * @psalm-suppress PossiblyInvalidArgument First argument of array_filter is always an array. * @psalm-suppress PossiblyNullArgument First argument of array_filter is always an array. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $asArray = $this->objectNormalizer->normalize($object, $this->format, $context); // Exclude null values from the output, even if PATCH is not supported on Apigee Edge diff --git a/src/Normalizer/PropertiesPropertyNormalizer.php b/src/Normalizer/PropertiesPropertyNormalizer.php index 8b8676ea..11fd557c 100644 --- a/src/Normalizer/PropertiesPropertyNormalizer.php +++ b/src/Normalizer/PropertiesPropertyNormalizer.php @@ -34,7 +34,7 @@ class PropertiesPropertyNormalizer extends KeyValueMapNormalizer * @psalm-suppress InvalidReturnType Returning an object here is required * for creating a valid Apigee Edge request. */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { $return = [ 'property' => parent::normalize($object, $format, $context), diff --git a/src/Serializer/EntitySerializer.php b/src/Serializer/EntitySerializer.php index 726badc1..d9334260 100755 --- a/src/Serializer/EntitySerializer.php +++ b/src/Serializer/EntitySerializer.php @@ -25,6 +25,7 @@ use Apigee\Edge\Normalizer\EdgeDateNormalizer; use Apigee\Edge\Normalizer\KeyValueMapNormalizer; use Apigee\Edge\Normalizer\ObjectNormalizer; +use ArrayObject; use Psr\Http\Message\ResponseInterface; use ReflectionMethod; use ReflectionObject; @@ -90,7 +91,7 @@ public function supportsDenormalization($data, $type, $format = null) /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|\ArrayObject|null + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { return $this->serializer->normalize($object, $format, $context); }