Created an interface for PersonJsonNormalizer

This commit is contained in:
nobohan 2022-02-16 21:09:27 +01:00
parent 56a4fd3fa0
commit b992bde41d
2 changed files with 37 additions and 5 deletions

View File

@ -33,11 +33,7 @@ use function array_key_exists;
/**
* Serialize a Person entity.
*/
class PersonJsonNormalizer implements
DenormalizerAwareInterface,
DenormalizerInterface,
NormalizerAwareInterface,
NormalizerInterface
class PersonJsonNormalizer implements PersonJsonNormalizerInterface
{
use DenormalizerAwareTrait;

View File

@ -0,0 +1,36 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Chill\PersonBundle\Serializer\Normalizer;
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* Serialize a Person entity.
*/
interface PersonJsonNormalizerInterface extends
DenormalizerAwareInterface,
DenormalizerInterface,
NormalizerAwareInterface,
NormalizerInterface
{
public function denormalize($data, $type, $format = null, array $context = []);
public function normalize($person, $format = null, array $context = []);
public function supportsDenormalization($data, $type, $format = null);
public function supportsNormalization($data, $format = null): bool;
}