cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

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