apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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);
}
}