From df6f2a1614f924f082b1a0145d13c59f3d844304 Mon Sep 17 00:00:00 2001 From: Kedar Khaire Date: Fri, 18 Oct 2024 21:21:11 +0530 Subject: [PATCH] Fixes issue of Method normalize with return type '' is different to return type 'ArrayObject|array|null|scalar' of inherited method NormalizerInterface::normalize --- 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 e84a51c4..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 = []) + 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 05ab9e6c..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 = []) + 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 f0fba9e9..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 = []) + 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 3f7b3564..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 = []) + 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 a7e73b0d..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 = []) + 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 c8a45393..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 = []) + 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 3debb38a..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 = []) + 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 e2626f1c..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 = []) + 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 dda8754f..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 = []) + 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 0903c413..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 = []) + 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 5010f277..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 = []) + 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 68065c92..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 = []) + 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 0bff438a..a7725429 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 = []) + 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 85242c3b..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 = []) + 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 1be6dfb4..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 = []) + 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 f86a78d6..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 = []) + 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 8eba9f35..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 = []) + 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 c56ffd0d..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 = []) + 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 341a715a..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 = []) + 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 cbae260c..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 = []) + 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 3259c4e6..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 = []) + 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 50c51842..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 = []) + 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 54f1bb9e..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 = []) + 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 95b008f4..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 = []) + 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 0af7aff6..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 = []) + 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 b8f47969..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 = []) + 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 ff81fbd4..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 = []) + 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 2cf26536..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 = []) + 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 3914a8cf..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 = []) + 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 80d5c8d1..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 = []) + 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 7a1b1adb..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 = []) + 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 77025207..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 = []) + 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 998c0427..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 = []) + 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 644e9d21..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 = []) + 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 7818c637..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 = []) + 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 cf151fa4..9e2f4a84 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): bool /** * {@inheritdoc} */ - public function normalize($object, $format = null, array $context = []) + public function normalize($object, $format = null, array $context = []): array|string|int|float|bool|ArrayObject|null { return $this->serializer->normalize($object, $format, $context); }