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

Fixed Interface Issues with Type Hinting #312

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"require": {
"php": "^7.0",
"symfony/serializer": "^3.0|^4.0",
"symfony/serializer": "^3.0|^4.0|^5.0",
"paragonie/random_compat": "*"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer/Normalizer/CustomReferencedNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function normalize($object, $format = null, array $context = [])
/**
* {@inheritdoc}
*/
public function supportsNormalization($data, $format = null)
public function supportsNormalization($data, string $format = null)
{
return $data instanceof AbstractNormalizable;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Serializer/OrderedSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class OrderedSerializer extends Serializer
/**
* {@inheritdoc}
*/
public function normalize($data, $format = null, array $context = [])
public function normalize($data, string $format = null, array $context = [])
{
return parent::normalize(
is_array($data) ? $this->order($data) : $data,
Expand All @@ -34,7 +34,7 @@ public function normalize($data, $format = null, array $context = [])
/**
* {@inheritdoc}
*/
public function denormalize($data, $type, $format = null, array $context = [])
public function denormalize($data, string $type, string $format = null, array $context = [])
{
return parent::denormalize(
is_array($data) ? $this->order($data) : $data,
Expand Down