From dff231ca6ff10098eeedca396ee04b9b6dc5080e Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Fri, 18 Oct 2024 21:46:33 +0530 Subject: [PATCH] Fix for other types --- src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php | 5 ++--- src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php | 5 ++--- .../ApigeeX/Normalizer/AppGroupMembershipNormalizer.php | 5 ++--- src/Api/ApigeeX/Normalizer/AppNormalizer.php | 5 ++--- src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php | 5 ++--- src/Api/ApigeeX/Normalizer/PrepaidBalanceNormalizer.php | 2 +- src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php | 5 ++--- src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php | 5 ++--- src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php | 5 ++--- src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php | 5 ++--- src/Api/Management/Normalizer/AppCredentialNormalizer.php | 5 ++--- src/Api/Management/Normalizer/AppNormalizer.php | 5 ++--- .../Management/Normalizer/CompanyMembershipNormalizer.php | 5 ++--- src/Api/Management/Query/StatsQueryNormalizer.php | 5 ++--- .../Monetization/Normalizer/AcceptedRatePlanNormalizer.php | 5 ++--- src/Api/Monetization/Normalizer/AddressNormalizer.php | 2 +- src/Api/Monetization/Normalizer/ApiPackageNormalizer.php | 5 ++--- src/Api/Monetization/Normalizer/BalanceNormalizer.php | 2 +- .../Normalizer/CompanyAcceptedRatePlanNormalizer.php | 2 +- .../Normalizer/CompanyPaymentTransactionNormalizer.php | 5 ++--- .../Monetization/Normalizer/CompanyRatePlanNormalizer.php | 2 +- .../Normalizer/CompanyReportDefinitionNormalizer.php | 2 +- src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php | 5 ++--- .../Normalizer/DeveloperCategoryRatePlanNormalizer.php | 5 ++--- .../Normalizer/DeveloperPaymentTransactionNormalizer.php | 5 ++--- .../Normalizer/DeveloperRatePlanNormalizer.php | 2 +- .../Normalizer/DeveloperReportDefinitionNormalizer.php | 2 +- src/Api/Monetization/Normalizer/EntityNormalizer.php | 3 +-- src/Api/Monetization/Normalizer/LegalEntityNormalizer.php | 5 ++--- .../Normalizer/LegalEntityRatePlanNormalizer.php | 3 +-- .../Normalizer/LegalEntityReportDefinitionNormalizer.php | 3 +-- .../Normalizer/OrganizationProfileNormalizer.php | 2 +- .../Normalizer/PaymentTransactionNormalizer.php | 2 +- .../Monetization/Normalizer/PrepaidBalanceNormalizer.php | 2 +- src/Api/Monetization/Normalizer/RatePlanNormalizer.php | 5 ++--- .../Monetization/Normalizer/RatePlanNormalizerFactory.php | 5 ++--- src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php | 5 ++--- .../Monetization/Normalizer/ReportCriteriaNormalizer.php | 5 ++--- .../Monetization/Normalizer/ReportDefinitionNormalizer.php | 5 ++--- .../Monetization/Normalizer/StandardRatePlanNormalizer.php | 5 ++--- .../Normalizer/SupportedCurrencyNormalizer.php | 2 +- .../Normalizer/TermsAndConditionsNormalizer.php | 5 ++--- src/Normalizer/CredentialProductNormalizer.php | 5 ++--- src/Normalizer/EdgeDateNormalizer.php | 5 ++--- src/Normalizer/KeyValueMapNormalizer.php | 5 ++--- src/Normalizer/ObjectNormalizer.php | 5 ++--- src/Normalizer/PropertiesPropertyNormalizer.php | 5 ++--- src/Serializer/EntitySerializer.php | 7 +++---- 48 files changed, 82 insertions(+), 118 deletions(-) diff --git a/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php index 0b48ca332..abe097912 100755 --- a/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php @@ -21,7 +21,6 @@ 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 { @@ -33,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 */ @@ -45,7 +44,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof AcceptedRatePlanInterface; } diff --git a/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php b/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php index 2f8d9ed22..4ab87a1d8 100755 --- a/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php @@ -21,7 +21,6 @@ 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; @@ -49,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 = parent::normalize($object, $format, $context); @@ -59,7 +58,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof ApiProductInterface; } diff --git a/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php b/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php index 49ecc4030..91dc21fa9 100644 --- a/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php @@ -19,7 +19,6 @@ 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 @@ -30,7 +29,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 = []; @@ -45,7 +44,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof AppGroupMembership; } diff --git a/src/Api/ApigeeX/Normalizer/AppNormalizer.php b/src/Api/ApigeeX/Normalizer/AppNormalizer.php index 649c925bb..8eb0b9e14 100644 --- a/src/Api/ApigeeX/Normalizer/AppNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/AppNormalizer.php @@ -20,7 +20,6 @@ use Apigee\Edge\Api\Management\Entity\AppInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; -use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -31,7 +30,7 @@ class AppNormalizer extends ObjectNormalizer implements NormalizerInterface /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof AppInterface; } @@ -42,7 +41,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 212eaca48..25a35d4fc 100644 --- a/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php @@ -20,7 +20,6 @@ use Apigee\Edge\Api\ApigeeX\Entity\BillingTypeInterface; use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer; -use ArrayObject; class BillingTypeNormalizer extends EntityNormalizer { @@ -30,7 +29,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 */ @@ -42,7 +41,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof BillingTypeInterface; } diff --git a/src/Api/ApigeeX/Normalizer/PrepaidBalanceNormalizer.php b/src/Api/ApigeeX/Normalizer/PrepaidBalanceNormalizer.php index 72f9bb10a..6a9ee05ee 100755 --- a/src/Api/ApigeeX/Normalizer/PrepaidBalanceNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/PrepaidBalanceNormalizer.php @@ -45,7 +45,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory /** * {@inheritDoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof PrepaidBalanceInterface; } diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php index 7aae5d2f9..b78d8268a 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php @@ -23,7 +23,6 @@ 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; @@ -53,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); @@ -71,7 +70,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof RatePlanInterface; } diff --git a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php index 82aa8a94a..70730221e 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php @@ -21,7 +21,6 @@ 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; @@ -57,7 +56,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 @@ -71,7 +70,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { foreach ($this->normalizers as $denormalizer) { if ($denormalizer->supportsNormalization($data, $format)) { diff --git a/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php b/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php index 8049388f7..d1214aa64 100755 --- a/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php @@ -21,7 +21,6 @@ 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 { @@ -31,7 +30,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); @@ -47,7 +46,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof RatePlanRate; } diff --git a/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php b/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php index cf796a582..b0874e41b 100755 --- a/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php +++ b/src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php @@ -20,7 +20,6 @@ use Apigee\Edge\Api\ApigeeX\Entity\RatePlanInterface; use Apigee\Edge\Api\ApigeeX\Entity\StandardRatePlanInterface; -use ArrayObject; class StandardRatePlanNormalizer extends RatePlanNormalizer { @@ -30,7 +29,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); @@ -42,7 +41,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof StandardRatePlanInterface; } diff --git a/src/Api/Management/Normalizer/AppCredentialNormalizer.php b/src/Api/Management/Normalizer/AppCredentialNormalizer.php index 8cc96833c..21d88a4d8 100644 --- a/src/Api/Management/Normalizer/AppCredentialNormalizer.php +++ b/src/Api/Management/Normalizer/AppCredentialNormalizer.php @@ -20,7 +20,6 @@ use Apigee\Edge\Api\Management\Entity\AppCredentialInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; -use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -31,7 +30,7 @@ class AppCredentialNormalizer extends ObjectNormalizer implements NormalizerInte /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof AppCredentialInterface; } @@ -42,7 +41,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 635e7191b..e94276cb9 100644 --- a/src/Api/Management/Normalizer/AppNormalizer.php +++ b/src/Api/Management/Normalizer/AppNormalizer.php @@ -20,7 +20,6 @@ use Apigee\Edge\Api\Management\Entity\AppInterface; use Apigee\Edge\Normalizer\ObjectNormalizer; -use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -31,7 +30,7 @@ class AppNormalizer extends ObjectNormalizer implements NormalizerInterface /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof AppInterface; } @@ -42,7 +41,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 97f7f7cc4..673364594 100644 --- a/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php +++ b/src/Api/Management/Normalizer/CompanyMembershipNormalizer.php @@ -19,7 +19,6 @@ namespace Apigee\Edge\Api\Management\Normalizer; use Apigee\Edge\Api\Management\Structure\CompanyMembership; -use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class CompanyMembershipNormalizer implements NormalizerInterface @@ -30,7 +29,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' => [], @@ -48,7 +47,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof CompanyMembership; } diff --git a/src/Api/Management/Query/StatsQueryNormalizer.php b/src/Api/Management/Query/StatsQueryNormalizer.php index a77254295..dc50bcd67 100644 --- a/src/Api/Management/Query/StatsQueryNormalizer.php +++ b/src/Api/Management/Query/StatsQueryNormalizer.php @@ -19,7 +19,6 @@ 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; @@ -53,7 +52,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. @@ -93,7 +92,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof StatsQuery; } diff --git a/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php index 569967fe8..170a79e42 100644 --- a/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/AcceptedRatePlanNormalizer.php @@ -20,7 +20,6 @@ use Apigee\Edge\Api\Monetization\Entity\AcceptedRatePlanInterface; use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait; -use ArrayObject; class AcceptedRatePlanNormalizer extends EntityNormalizer { @@ -32,7 +31,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 */ @@ -45,7 +44,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof AcceptedRatePlanInterface; } diff --git a/src/Api/Monetization/Normalizer/AddressNormalizer.php b/src/Api/Monetization/Normalizer/AddressNormalizer.php index 952074d7b..b2f941297 100644 --- a/src/Api/Monetization/Normalizer/AddressNormalizer.php +++ b/src/Api/Monetization/Normalizer/AddressNormalizer.php @@ -45,7 +45,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof Address; } diff --git a/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php b/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php index 53fe1454b..022922eed 100644 --- a/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php +++ b/src/Api/Monetization/Normalizer/ApiPackageNormalizer.php @@ -20,7 +20,6 @@ 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; @@ -48,7 +47,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); @@ -64,7 +63,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof ApiPackageInterface; } diff --git a/src/Api/Monetization/Normalizer/BalanceNormalizer.php b/src/Api/Monetization/Normalizer/BalanceNormalizer.php index caf718baf..e467b88bb 100644 --- a/src/Api/Monetization/Normalizer/BalanceNormalizer.php +++ b/src/Api/Monetization/Normalizer/BalanceNormalizer.php @@ -44,7 +44,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof BalanceInterface; } diff --git a/src/Api/Monetization/Normalizer/CompanyAcceptedRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/CompanyAcceptedRatePlanNormalizer.php index c1331400d..98341571f 100644 --- a/src/Api/Monetization/Normalizer/CompanyAcceptedRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyAcceptedRatePlanNormalizer.php @@ -44,7 +44,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof CompanyAcceptedRatePlanInterface; } diff --git a/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php index 335b2ee19..1a3f95779 100644 --- a/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyPaymentTransactionNormalizer.php @@ -20,7 +20,6 @@ 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; @@ -48,7 +47,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); @@ -60,7 +59,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof CompanyPaymentTransaction; } diff --git a/src/Api/Monetization/Normalizer/CompanyRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/CompanyRatePlanNormalizer.php index cfc5eaab3..2851b6327 100644 --- a/src/Api/Monetization/Normalizer/CompanyRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyRatePlanNormalizer.php @@ -44,7 +44,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof CompanyRatePlanInterface; } diff --git a/src/Api/Monetization/Normalizer/CompanyReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/CompanyReportDefinitionNormalizer.php index 3c155635d..22974aead 100644 --- a/src/Api/Monetization/Normalizer/CompanyReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/CompanyReportDefinitionNormalizer.php @@ -44,7 +44,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof CompanyReportDefinitionInterface; } diff --git a/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php b/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php index 165cede81..38cef829f 100644 --- a/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php +++ b/src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php @@ -18,7 +18,6 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; -use ArrayObject; use DateTimeZone; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -27,7 +26,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(); } @@ -35,7 +34,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof DateTimeZone; } diff --git a/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php index 417a08bfd..9f8788a69 100644 --- a/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperCategoryRatePlanNormalizer.php @@ -20,7 +20,6 @@ use Apigee\Edge\Api\Monetization\Entity\DeveloperCategoryRatePlanInterface; use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; -use ArrayObject; class DeveloperCategoryRatePlanNormalizer extends RatePlanNormalizer { @@ -30,7 +29,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); @@ -42,7 +41,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof DeveloperCategoryRatePlanInterface; } diff --git a/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php index a7e0bf947..139c6e38e 100644 --- a/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperPaymentTransactionNormalizer.php @@ -19,7 +19,6 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; use Apigee\Edge\Api\Monetization\Structure\DeveloperPaymentTransaction; -use ArrayObject; class DeveloperPaymentTransactionNormalizer extends PaymentTransactionNormalizer { @@ -29,7 +28,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); @@ -41,7 +40,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof DeveloperPaymentTransaction; } diff --git a/src/Api/Monetization/Normalizer/DeveloperRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperRatePlanNormalizer.php index 9c8f0ccb3..1b9a3f858 100644 --- a/src/Api/Monetization/Normalizer/DeveloperRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperRatePlanNormalizer.php @@ -25,7 +25,7 @@ class DeveloperRatePlanNormalizer extends LegalEntityRatePlanNormalizer /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof DeveloperRatePlanInterface; } diff --git a/src/Api/Monetization/Normalizer/DeveloperReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/DeveloperReportDefinitionNormalizer.php index 7a5739d57..9e804d595 100644 --- a/src/Api/Monetization/Normalizer/DeveloperReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/DeveloperReportDefinitionNormalizer.php @@ -25,7 +25,7 @@ class DeveloperReportDefinitionNormalizer extends LegalEntityReportDefinitionNor /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof DeveloperReportDefinitionInterface; } diff --git a/src/Api/Monetization/Normalizer/EntityNormalizer.php b/src/Api/Monetization/Normalizer/EntityNormalizer.php index ff1584df8..0f7a81758 100644 --- a/src/Api/Monetization/Normalizer/EntityNormalizer.php +++ b/src/Api/Monetization/Normalizer/EntityNormalizer.php @@ -20,7 +20,6 @@ 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; @@ -64,7 +63,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 8c1519c1c..70fb383c1 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityNormalizer.php @@ -22,7 +22,6 @@ 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; @@ -50,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 { /** @var object $normalized */ $normalized = parent::normalize($object, $format, $context); @@ -67,7 +66,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof LegalEntityInterface; } diff --git a/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php index 0fe3c49fd..bae1a783b 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityRatePlanNormalizer.php @@ -19,7 +19,6 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; -use ArrayObject; abstract class LegalEntityRatePlanNormalizer extends RatePlanNormalizer { @@ -29,7 +28,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 2790aca38..bcd7e489d 100644 --- a/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/LegalEntityReportDefinitionNormalizer.php @@ -18,7 +18,6 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; -use ArrayObject; abstract class LegalEntityReportDefinitionNormalizer extends ReportDefinitionNormalizer { @@ -28,7 +27,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/OrganizationProfileNormalizer.php b/src/Api/Monetization/Normalizer/OrganizationProfileNormalizer.php index fdde13ac0..fc4d9448b 100644 --- a/src/Api/Monetization/Normalizer/OrganizationProfileNormalizer.php +++ b/src/Api/Monetization/Normalizer/OrganizationProfileNormalizer.php @@ -44,7 +44,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof OrganizationProfileInterface; } diff --git a/src/Api/Monetization/Normalizer/PaymentTransactionNormalizer.php b/src/Api/Monetization/Normalizer/PaymentTransactionNormalizer.php index 065f868db..0c0e9826c 100644 --- a/src/Api/Monetization/Normalizer/PaymentTransactionNormalizer.php +++ b/src/Api/Monetization/Normalizer/PaymentTransactionNormalizer.php @@ -45,7 +45,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof PaymentTransaction; } diff --git a/src/Api/Monetization/Normalizer/PrepaidBalanceNormalizer.php b/src/Api/Monetization/Normalizer/PrepaidBalanceNormalizer.php index 0cbc4557b..7cb321e9b 100644 --- a/src/Api/Monetization/Normalizer/PrepaidBalanceNormalizer.php +++ b/src/Api/Monetization/Normalizer/PrepaidBalanceNormalizer.php @@ -44,7 +44,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof PrepaidBalanceInterface; } diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizer.php b/src/Api/Monetization/Normalizer/RatePlanNormalizer.php index 240a7a56e..e4d8a78c4 100644 --- a/src/Api/Monetization/Normalizer/RatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/RatePlanNormalizer.php @@ -22,7 +22,6 @@ 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; @@ -52,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 object $normalized */ $normalized = parent::normalize($object, $format, $context); @@ -76,7 +75,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof RatePlanInterface; } diff --git a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php index 69dff8534..b62fc8bbd 100644 --- a/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php +++ b/src/Api/Monetization/Normalizer/RatePlanNormalizerFactory.php @@ -18,7 +18,6 @@ namespace Apigee\Edge\Api\Monetization\Normalizer; -use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; use Symfony\Component\Serializer\SerializerAwareInterface; use Symfony\Component\Serializer\SerializerAwareTrait; @@ -54,7 +53,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 @@ -68,7 +67,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { foreach ($this->normalizers as $denormalizer) { if ($denormalizer->supportsNormalization($data, $format)) { diff --git a/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php b/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php index d4324550d..ced20de38 100644 --- a/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php +++ b/src/Api/Monetization/Normalizer/RatePlanRateNormalizer.php @@ -21,7 +21,6 @@ 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 { @@ -31,7 +30,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); @@ -47,7 +46,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof RatePlanRate; } diff --git a/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php b/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php index 46a0c4403..7776ce092 100644 --- a/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php +++ b/src/Api/Monetization/Normalizer/ReportCriteriaNormalizer.php @@ -22,7 +22,6 @@ 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; @@ -60,7 +59,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); @@ -96,7 +95,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof AbstractCriteria; } diff --git a/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php b/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php index 42be4c418..f49affe1d 100644 --- a/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php +++ b/src/Api/Monetization/Normalizer/ReportDefinitionNormalizer.php @@ -21,7 +21,6 @@ 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; @@ -51,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 ReportDefinitionInterface $object */ /** @var object $normalized */ @@ -68,7 +67,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof ReportDefinitionInterface; } diff --git a/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php b/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php index 643210a14..a6f17a584 100644 --- a/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php +++ b/src/Api/Monetization/Normalizer/StandardRatePlanNormalizer.php @@ -20,7 +20,6 @@ use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface; use Apigee\Edge\Api\Monetization\Entity\StandardRatePlanInterface; -use ArrayObject; class StandardRatePlanNormalizer extends RatePlanNormalizer { @@ -30,7 +29,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); @@ -42,7 +41,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof StandardRatePlanInterface; } diff --git a/src/Api/Monetization/Normalizer/SupportedCurrencyNormalizer.php b/src/Api/Monetization/Normalizer/SupportedCurrencyNormalizer.php index 13e36e4f8..d2239970f 100644 --- a/src/Api/Monetization/Normalizer/SupportedCurrencyNormalizer.php +++ b/src/Api/Monetization/Normalizer/SupportedCurrencyNormalizer.php @@ -44,7 +44,7 @@ public function __construct(?ClassMetadataFactoryInterface $classMetadataFactory /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof SupportedCurrencyInterface; } diff --git a/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php b/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php index a07911141..70117e1fe 100644 --- a/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php +++ b/src/Api/Monetization/Normalizer/TermsAndConditionsNormalizer.php @@ -22,7 +22,6 @@ 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; @@ -52,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 object $normalized */ $normalized = parent::normalize($object, $format, $context); @@ -73,7 +72,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof TermsAndConditionsInterface; } diff --git a/src/Normalizer/CredentialProductNormalizer.php b/src/Normalizer/CredentialProductNormalizer.php index a7d293a16..49a5354b0 100644 --- a/src/Normalizer/CredentialProductNormalizer.php +++ b/src/Normalizer/CredentialProductNormalizer.php @@ -19,7 +19,6 @@ namespace Apigee\Edge\Normalizer; use Apigee\Edge\Structure\CredentialProductInterface; -use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -33,7 +32,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 = [ @@ -49,7 +48,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof CredentialProductInterface; } diff --git a/src/Normalizer/EdgeDateNormalizer.php b/src/Normalizer/EdgeDateNormalizer.php index 45b1f0289..f63d7af60 100644 --- a/src/Normalizer/EdgeDateNormalizer.php +++ b/src/Normalizer/EdgeDateNormalizer.php @@ -18,7 +18,6 @@ namespace Apigee\Edge\Normalizer; -use ArrayObject; use DateTimeInterface; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; @@ -27,7 +26,7 @@ class EdgeDateNormalizer implements NormalizerInterface /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof DateTimeInterface; } @@ -35,7 +34,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 4f2fa86c1..1f7e0e5bc 100644 --- a/src/Normalizer/KeyValueMapNormalizer.php +++ b/src/Normalizer/KeyValueMapNormalizer.php @@ -19,7 +19,6 @@ namespace Apigee\Edge\Normalizer; use Apigee\Edge\Structure\KeyValueMapInterface; -use ArrayObject; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; /** @@ -30,7 +29,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) { @@ -43,7 +42,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof KeyValueMapInterface; } diff --git a/src/Normalizer/ObjectNormalizer.php b/src/Normalizer/ObjectNormalizer.php index 103843ce2..3a4ef9734 100644 --- a/src/Normalizer/ObjectNormalizer.php +++ b/src/Normalizer/ObjectNormalizer.php @@ -19,7 +19,6 @@ namespace Apigee\Edge\Normalizer; use Apigee\Edge\PropertyAccess\PropertyAccessorDecorator; -use ArrayObject; use Symfony\Component\PropertyAccess\PropertyAccess; use Symfony\Component\PropertyAccess\PropertyAccessorInterface; use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor; @@ -94,7 +93,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 @@ -110,7 +109,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { // Enforce the only supported format if format is null. $format = $format ?? $this->format; diff --git a/src/Normalizer/PropertiesPropertyNormalizer.php b/src/Normalizer/PropertiesPropertyNormalizer.php index 11fd557cb..5c345d0a0 100644 --- a/src/Normalizer/PropertiesPropertyNormalizer.php +++ b/src/Normalizer/PropertiesPropertyNormalizer.php @@ -19,7 +19,6 @@ namespace Apigee\Edge\Normalizer; use Apigee\Edge\Structure\PropertiesProperty; -use ArrayObject; /** * Class PropertiesPropertyNormalizer. @@ -34,7 +33,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), @@ -48,7 +47,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $data instanceof PropertiesProperty; } diff --git a/src/Serializer/EntitySerializer.php b/src/Serializer/EntitySerializer.php index 9e2f4a847..d78d6c84f 100755 --- a/src/Serializer/EntitySerializer.php +++ b/src/Serializer/EntitySerializer.php @@ -25,7 +25,6 @@ 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; @@ -91,7 +90,7 @@ public function supportsDenormalization($data, $type, $format = null): bool /** * {@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); } @@ -99,7 +98,7 @@ public function normalize($object, $format = null, array $context = []): array|s /** * {@inheritdoc} */ - public function supportsNormalization($data, $format = null) + public function supportsNormalization($data, $format = null): bool { return $this->format === $format && $this->serializer->supportsNormalization($data, $format); } @@ -200,7 +199,7 @@ public function decode($data, $format, array $context = []) /** * {@inheritdoc} */ - public function supportsDecoding($format) + public function supportsDecoding($format): bool { return $this->format === $format && $this->serializer->supportsDecoding($format); }