mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 14:54:57 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
<?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.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Serializer\Normalizer;
|
||||
|
||||
use Chill\MainBundle\Serializer\Model\Collection;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
class CollectionNormalizer implements NormalizerInterface, NormalizerAwareInterface
|
||||
{
|
||||
@@ -14,7 +21,7 @@ class CollectionNormalizer implements NormalizerInterface, NormalizerAwareInterf
|
||||
/**
|
||||
* @param Collection $collection
|
||||
*/
|
||||
public function normalize($collection, string $format = null, array $context = [])
|
||||
public function normalize($collection, ?string $format = null, array $context = [])
|
||||
{
|
||||
$paginator = $collection->getPaginator();
|
||||
|
||||
@@ -31,7 +38,7 @@ class CollectionNormalizer implements NormalizerInterface, NormalizerAwareInterf
|
||||
];
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, string $format = null): bool
|
||||
public function supportsNormalization($data, ?string $format = null): bool
|
||||
{
|
||||
return $data instanceof Collection;
|
||||
}
|
||||
|
Reference in New Issue
Block a user