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,5 +1,12 @@
<?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.
*/
declare(strict_types=1);
namespace Chill\ThirdPartyBundle\Serializer\Normalizer;
@@ -10,7 +17,6 @@ use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
class ThirdPartyNormalizer implements NormalizerInterface, NormalizerAwareInterface
{
use NormalizerAwareTrait;
@@ -25,14 +31,14 @@ class ThirdPartyNormalizer implements NormalizerInterface, NormalizerAwareInterf
/**
* @param ThirdParty $thirdParty
*/
public function normalize($thirdParty, string $format = null, array $context = [])
public function normalize($thirdParty, ?string $format = null, array $context = [])
{
return [
'type' => 'thirdparty',
'text' => $this->thirdPartyRender->renderString($thirdParty, []),
'id' => $thirdParty->getId(),
'kind' => $thirdParty->getKind(),
'address' => $this->normalizer->normalize($thirdParty->getAddress(), $format, [ 'address_rendering' => 'short' ]),
'address' => $this->normalizer->normalize($thirdParty->getAddress(), $format, ['address_rendering' => 'short']),
'phonenumber' => $thirdParty->getTelephone(),
'email' => $thirdParty->getEmail(),
'isChild' => $thirdParty->isChild(),
@@ -42,9 +48,8 @@ class ThirdPartyNormalizer implements NormalizerInterface, NormalizerAwareInterf
];
}
public function supportsNormalization($data, string $format = null)
public function supportsNormalization($data, ?string $format = null)
{
return $data instanceof ThirdParty;
}
}