mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Serializer\Normalizer;
|
||||
|
||||
use ArrayObject;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
|
||||
use Chill\MainBundle\Workflow\Helper\MetadataExtractor;
|
||||
use Symfony\Component\Serializer\Exception\ExceptionInterface;
|
||||
@@ -19,7 +18,6 @@ use Symfony\Component\Serializer\Normalizer\ContextAwareNormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
|
||||
use Symfony\Component\Workflow\Registry;
|
||||
use function array_key_exists;
|
||||
|
||||
class WorkflowNormalizer implements ContextAwareNormalizerInterface, NormalizerAwareInterface
|
||||
{
|
||||
@@ -32,11 +30,11 @@ class WorkflowNormalizer implements ContextAwareNormalizerInterface, NormalizerA
|
||||
/**
|
||||
* @param EntityWorkflow $object
|
||||
*
|
||||
* @throws ExceptionInterface
|
||||
* @return array|\ArrayObject|bool|float|int|string|void|null
|
||||
*
|
||||
* @return array|ArrayObject|bool|float|int|string|void|null
|
||||
* @throws ExceptionInterface
|
||||
*/
|
||||
public function normalize($object, ?string $format = null, array $context = []): array
|
||||
public function normalize($object, string $format = null, array $context = []): array
|
||||
{
|
||||
$data = $this->normalizer->normalize($object, $format, array_merge(
|
||||
$context,
|
||||
@@ -53,10 +51,10 @@ class WorkflowNormalizer implements ContextAwareNormalizerInterface, NormalizerA
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
public function supportsNormalization($data, string $format = null, array $context = []): bool
|
||||
{
|
||||
return 'json' === $format
|
||||
&& $data instanceof EntityWorkflow
|
||||
&& !array_key_exists(self::IGNORE_ENTITY_WORKFLOW, $context);
|
||||
&& !\array_key_exists(self::IGNORE_ENTITY_WORKFLOW, $context);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user