Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fixes issue of Method normalize with return type '' is different to return type 'ArrayObject|array<array-key, mixed>|null|scalar' of inherited method NormalizerInterface::normalize #387

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# CHANGELOG
## [3.0.8](https://github.com/apigee/apigee-client-php/milestone/32?closed=1)
* [#379] Update option-resolver's symfony component version to its latest.

## [3.0.7](https://github.com/apigee/apigee-client-php/milestone/31?closed=1)
* [#374] Bump minimum required version of symfony/serializer.
* [#376] Remove symfony/serializer conflict and bump version.
Expand Down
3 changes: 2 additions & 1 deletion src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
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

Check failure on line 26 in src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.2, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php:26:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\AcceptedRatePlanNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)

Check failure on line 26 in src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.3, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/AcceptedRatePlanNormalizer.php:26:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\AcceptedRatePlanNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)
{
use TimezoneFixerHelperTrait;

Expand All @@ -32,7 +33,7 @@
* @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 */
Expand Down
3 changes: 2 additions & 1 deletion src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
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;
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;

class ApiProductNormalizer extends EntityNormalizer

Check failure on line 30 in src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.2, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php:30:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\ApiProductNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)

Check failure on line 30 in src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.3, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/ApiProductNormalizer.php:30:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\ApiProductNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)
{
/**
* ApiProductNormalizer constructor.
Expand All @@ -48,7 +49,7 @@
* @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);

Expand Down
3 changes: 2 additions & 1 deletion src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
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

Check failure on line 25 in src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.2, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php:25:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\AppGroupMembershipNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)

Check failure on line 25 in src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.2, )

UnimplementedInterfaceMethod

src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php:25:7: UnimplementedInterfaceMethod: Method getsupportedtypes is not defined on class Apigee\Edge\Api\ApigeeX\Normalizer\AppGroupMembershipNormalizer (see https://psalm.dev/044)

Check failure on line 25 in src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.3, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php:25:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\AppGroupMembershipNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)

Check failure on line 25 in src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.3, )

UnimplementedInterfaceMethod

src/Api/ApigeeX/Normalizer/AppGroupMembershipNormalizer.php:25:7: UnimplementedInterfaceMethod: Method getsupportedtypes is not defined on class Apigee\Edge\Api\ApigeeX\Normalizer\AppGroupMembershipNormalizer (see https://psalm.dev/044)
{
/**
* {@inheritdoc}
Expand All @@ -29,7 +30,7 @@
* @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 = [];

Expand Down
3 changes: 2 additions & 1 deletion src/Api/ApigeeX/Normalizer/AppNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@

use Apigee\Edge\Api\Management\Entity\AppInterface;
use Apigee\Edge\Normalizer\ObjectNormalizer;
use ArrayObject;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

/**
* Class AppNormalizer.
*/
class AppNormalizer extends ObjectNormalizer implements NormalizerInterface

Check failure on line 29 in src/Api/ApigeeX/Normalizer/AppNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.2, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/AppNormalizer.php:29:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\AppNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)

Check failure on line 29 in src/Api/ApigeeX/Normalizer/AppNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.3, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/AppNormalizer.php:29:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\AppNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)
{
/**
* {@inheritdoc}
Expand All @@ -41,7 +42,7 @@
* @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);
Expand Down
3 changes: 2 additions & 1 deletion src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@

use Apigee\Edge\Api\ApigeeX\Entity\BillingTypeInterface;
use Apigee\Edge\Api\Monetization\Normalizer\EntityNormalizer;
use ArrayObject;

class BillingTypeNormalizer extends EntityNormalizer

Check failure on line 25 in src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.2, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php:25:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\BillingTypeNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)

Check failure on line 25 in src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.3, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/BillingTypeNormalizer.php:25:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\BillingTypeNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)
{
/**
* {@inheritdoc}
Expand All @@ -29,7 +30,7 @@
* @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 */
Expand Down
3 changes: 2 additions & 1 deletion src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@
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;
use Symfony\Component\Serializer\NameConverter\NameConverterInterface;

abstract class RatePlanNormalizer extends EntityNormalizer

Check failure on line 32 in src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.2, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php:32:16: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\RatePlanNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)

Check failure on line 32 in src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.3, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/RatePlanNormalizer.php:32:16: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\RatePlanNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)
{
use TimezoneFixerHelperTrait;

Expand All @@ -52,7 +53,7 @@
* @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);
Expand Down
3 changes: 2 additions & 1 deletion src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
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;
use Symfony\Component\Serializer\SerializerInterface;

class RatePlanNormalizerFactory implements NormalizerInterface, SerializerAwareInterface

Check failure on line 30 in src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.2, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php:30:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\RatePlanNormalizerFactory::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)

Check failure on line 30 in src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.3, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/RatePlanNormalizerFactory.php:30:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\RatePlanNormalizerFactory::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)
{
use SerializerAwareTrait {
setSerializer as private traitSetSerializer;
Expand Down Expand Up @@ -56,7 +57,7 @@
* @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
Expand Down
3 changes: 2 additions & 1 deletion src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
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

Check failure on line 26 in src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.2, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php:26:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\RatePlanRateNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)

Check failure on line 26 in src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php

View workflow job for this annotation

GitHub Actions / test_and_lint (8.3, )

MethodSignatureMismatch

src/Api/ApigeeX/Normalizer/RatePlanRateNormalizer.php:26:7: MethodSignatureMismatch: Method Apigee\Edge\Api\ApigeeX\Normalizer\RatePlanRateNormalizer::supportsNormalization with return type '' is different to return type 'bool' of inherited method Symfony\Component\Serializer\Normalizer\NormalizerInterface::supportsNormalization (see https://psalm.dev/042)
{
/**
* {@inheritdoc}
Expand All @@ -30,7 +31,7 @@
* @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);
Expand Down
3 changes: 2 additions & 1 deletion src/Api/ApigeeX/Normalizer/StandardRatePlanNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

use Apigee\Edge\Api\ApigeeX\Entity\RatePlanInterface;
use Apigee\Edge\Api\ApigeeX\Entity\StandardRatePlanInterface;
use ArrayObject;

class StandardRatePlanNormalizer extends RatePlanNormalizer
{
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/Api/Management/Normalizer/AppCredentialNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

use Apigee\Edge\Api\Management\Entity\AppCredentialInterface;
use Apigee\Edge\Normalizer\ObjectNormalizer;
use ArrayObject;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

/**
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/Api/Management/Normalizer/AppNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

use Apigee\Edge\Api\Management\Entity\AppInterface;
use Apigee\Edge\Normalizer\ObjectNormalizer;
use ArrayObject;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

/**
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [],
Expand Down
3 changes: 2 additions & 1 deletion src/Api/Management/Query/StatsQueryNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

use Apigee\Edge\Api\Monetization\Entity\AcceptedRatePlanInterface;
use Apigee\Edge\Api\Monetization\Utility\TimezoneFixerHelperTrait;
use ArrayObject;

class AcceptedRatePlanNormalizer extends EntityNormalizer
{
Expand All @@ -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 */
Expand Down
3 changes: 2 additions & 1 deletion src/Api/Monetization/Normalizer/ApiPackageNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/Api/Monetization/Normalizer/DateTimeZoneNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

namespace Apigee\Edge\Api\Monetization\Normalizer;

use ArrayObject;
use DateTimeZone;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;

Expand All @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

use Apigee\Edge\Api\Monetization\Entity\DeveloperCategoryRatePlanInterface;
use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface;
use ArrayObject;

class DeveloperCategoryRatePlanNormalizer extends RatePlanNormalizer
{
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
namespace Apigee\Edge\Api\Monetization\Normalizer;

use Apigee\Edge\Api\Monetization\Structure\DeveloperPaymentTransaction;
use ArrayObject;

class DeveloperPaymentTransactionNormalizer extends PaymentTransactionNormalizer
{
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/Api/Monetization/Normalizer/EntityNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down
3 changes: 2 additions & 1 deletion src/Api/Monetization/Normalizer/LegalEntityNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
namespace Apigee\Edge\Api\Monetization\Normalizer;

use Apigee\Edge\Api\Monetization\Entity\RatePlanInterface;
use ArrayObject;

abstract class LegalEntityRatePlanNormalizer extends RatePlanNormalizer
{
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

namespace Apigee\Edge\Api\Monetization\Normalizer;

use ArrayObject;

abstract class LegalEntityReportDefinitionNormalizer extends ReportDefinitionNormalizer
{
/**
Expand All @@ -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);
Expand Down
Loading
Loading