mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
upgrade php-cs 3.49
This commit is contained in:
@@ -32,7 +32,7 @@ class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterfa
|
||||
*
|
||||
* @throws ExceptionInterface
|
||||
*/
|
||||
public function normalize($object, string $format = null, array $context = []): array
|
||||
public function normalize($object, ?string $format = null, array $context = []): array
|
||||
{
|
||||
if (null === $object || $object->isEmpty()) {
|
||||
return [
|
||||
@@ -65,7 +65,7 @@ class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterfa
|
||||
];
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, string $format = null, array $context = []): bool
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
if ('docgen' !== $format) {
|
||||
return false;
|
||||
|
@@ -32,7 +32,7 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function normalize($object, string $format = null, array $context = [])
|
||||
public function normalize($object, ?string $format = null, array $context = [])
|
||||
{
|
||||
$workflow = $this->registry->get($object, $object->getWorkflowName());
|
||||
$handler = $this->entityWorkflowManager->getHandler($object);
|
||||
@@ -50,7 +50,7 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn
|
||||
];
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, string $format = null): bool
|
||||
public function supportsNormalization($data, ?string $format = null): bool
|
||||
{
|
||||
return $data instanceof EntityWorkflow && 'json' === $format;
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ class EntityWorkflowStepNormalizer implements NormalizerAwareInterface, Normaliz
|
||||
/**
|
||||
* @param EntityWorkflowStep $object
|
||||
*/
|
||||
public function normalize($object, string $format = null, array $context = []): array
|
||||
public function normalize($object, ?string $format = null, array $context = []): array
|
||||
{
|
||||
$data = [
|
||||
'type' => 'entity_workflow_step',
|
||||
@@ -77,7 +77,7 @@ class EntityWorkflowStepNormalizer implements NormalizerAwareInterface, Normaliz
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, string $format = null): bool
|
||||
public function supportsNormalization($data, ?string $format = null): bool
|
||||
{
|
||||
return $data instanceof EntityWorkflowStep && 'json' === $format;
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ class NotificationNormalizer implements NormalizerAwareInterface, NormalizerInte
|
||||
*
|
||||
* @return array|\ArrayObject|bool|float|int|string|void|null
|
||||
*/
|
||||
public function normalize($object, string $format = null, array $context = [])
|
||||
public function normalize($object, ?string $format = null, array $context = [])
|
||||
{
|
||||
$entity = $this->entityManager
|
||||
->getRepository($object->getRelatedEntityClass())
|
||||
@@ -53,7 +53,7 @@ class NotificationNormalizer implements NormalizerAwareInterface, NormalizerInte
|
||||
];
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, string $format = null)
|
||||
public function supportsNormalization($data, ?string $format = null)
|
||||
{
|
||||
return $data instanceof Notification && 'json' === $format;
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ class PhonenumberNormalizer implements ContextAwareNormalizerInterface, Denormal
|
||||
}
|
||||
}
|
||||
|
||||
public function normalize($object, string $format = null, array $context = []): string
|
||||
public function normalize($object, ?string $format = null, array $context = []): string
|
||||
{
|
||||
if ('docgen' === $format && null === $object) {
|
||||
return '';
|
||||
@@ -64,7 +64,7 @@ class PhonenumberNormalizer implements ContextAwareNormalizerInterface, Denormal
|
||||
return 'libphonenumber\PhoneNumber' === $type;
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, string $format = null, array $context = []): bool
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
if ($data instanceof PhoneNumber && 'json' === $format) {
|
||||
return true;
|
||||
|
@@ -22,7 +22,7 @@ class PrivateCommentEmbeddableNormalizer implements NormalizerInterface, Denorma
|
||||
{
|
||||
}
|
||||
|
||||
public function denormalize($data, string $type, string $format = null, array $context = []): PrivateCommentEmbeddable
|
||||
public function denormalize($data, string $type, ?string $format = null, array $context = []): PrivateCommentEmbeddable
|
||||
{
|
||||
$comment = new PrivateCommentEmbeddable();
|
||||
|
||||
@@ -40,12 +40,12 @@ class PrivateCommentEmbeddableNormalizer implements NormalizerInterface, Denorma
|
||||
return $object->getCommentForUser($this->security->getUser());
|
||||
}
|
||||
|
||||
public function supportsDenormalization($data, string $type, string $format = null): bool
|
||||
public function supportsDenormalization($data, string $type, ?string $format = null): bool
|
||||
{
|
||||
return PrivateCommentEmbeddable::class === $type;
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, string $format = null): bool
|
||||
public function supportsNormalization($data, ?string $format = null): bool
|
||||
{
|
||||
return $data instanceof PrivateCommentEmbeddable;
|
||||
}
|
||||
|
Reference in New Issue
Block a user