Skip to content

Commit

Permalink
Changes for last few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kedarkhaire committed Oct 25, 2024
1 parent 4cb13e1 commit c3ac789
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function normalize($object, $format = null, array $context = []): array|s

// convert to ArrayObject as symfony normalizer throws error for std object.
// set ARRAY_AS_PROPS flag as we need entries to be accessed as properties.
return new ArrayObject($normalized, ArrayObject::ARRAY_AS_PROPS);
return new \ArrayObject($normalized, \ArrayObject::ARRAY_AS_PROPS);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Normalizer/CredentialProductNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function normalize($object, $format = null, array $context = []): array|s

// Need to convert to ArrayObject as symfony normalizer throws error for std object.
// Need to set ARRAY_AS_PROPS flag as we need Entries to be accessed as properties.
return new ArrayObject($asObject, ArrayObject::ARRAY_AS_PROPS);
return new \ArrayObject($asObject, \ArrayObject::ARRAY_AS_PROPS);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Normalizer/ObjectNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ public function setSerializer(SerializerInterface $serializer): void
/**
* {@inheritDoc}
*/
public function convertToArrayObject($normalized, $array_as_props = ArrayObject::ARRAY_AS_PROPS)
public function convertToArrayObject($normalized, $array_as_props = \ArrayObject::ARRAY_AS_PROPS)
{
// default set ARRAY_AS_PROPS flag as we need entries to be accessed as properties.
return new ArrayObject($normalized, $array_as_props);
return new \ArrayObject($normalized, $array_as_props);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Normalizer/PropertiesPropertyNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function normalize($object, $format = null, array $context = []): array|s

// convert to ArrayObject as symfony normalizer throws error for std object.
// set ARRAY_AS_PROPS flag as we need entries to be accessed as properties.
return new ArrayObject($return, ArrayObject::ARRAY_AS_PROPS);
return new \ArrayObject($return, \ArrayObject::ARRAY_AS_PROPS);
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/Serializer/EntitySerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use Apigee\Edge\Normalizer\EdgeDateNormalizer;
use Apigee\Edge\Normalizer\KeyValueMapNormalizer;
use Apigee\Edge\Normalizer\ObjectNormalizer;
use Apigee\Edge\Serializer\JsonDecode;
use Psr\Http\Message\ResponseInterface;
use ReflectionMethod;
use ReflectionObject;
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer/JsonDecode.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function __construct($defaultContext = [], int $depth = 512)
/**
* {@inheritdoc}
*/
public function decode($data, $format, array $context = []): mixed: mixed
public function decode($data, $format, array $context = []): mixed
{
$context['json_decode_options'] = empty($context['json_decode_options']) ? $this->options : $context['json_decode_options'];

Expand Down

0 comments on commit c3ac789

Please sign in to comment.