mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-12-13 05:43:14 +00:00
rector fixes
This commit is contained in:
@@ -45,7 +45,7 @@ class PhonenumberNormalizer implements ContextAwareNormalizerInterface, Denormal
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
return $this->phoneNumberUtil->parse($data, $this->defaultCarrierCode);
|
return $this->phoneNumberUtil->parse($data, $this->defaultCarrierCode);
|
||||||
} catch (NumberParseException $e) {
|
} catch (NumberParseException) {
|
||||||
$phonenumber = new PhoneNumber();
|
$phonenumber = new PhoneNumber();
|
||||||
$phonenumber->setRawInput($data);
|
$phonenumber->setRawInput($data);
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ final class PersonJsonDenormalizer implements DenormalizerInterface, Denormalize
|
|||||||
foreach ($data['altNames'] as $altNameData) {
|
foreach ($data['altNames'] as $altNameData) {
|
||||||
if (!array_key_exists('key', $altNameData)
|
if (!array_key_exists('key', $altNameData)
|
||||||
|| !array_key_exists('value', $altNameData)
|
|| !array_key_exists('value', $altNameData)
|
||||||
|| '' === trim($altNameData['key'])
|
|| '' === trim((string) $altNameData['key'])
|
||||||
) {
|
) {
|
||||||
throw new UnexpectedValueException('format for alt name is not correct');
|
throw new UnexpectedValueException('format for alt name is not correct');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ class PersonIdentifierListApiControllerTest extends TestCase
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function validate(ExecutionContextInterface $context, PersonIdentifier $identifier, PersonIdentifierDefinition $definition): void {}
|
public function validate(ExecutionContextInterface $context, PersonIdentifier $identifier, PersonIdentifierDefinition $definition = null): void {}
|
||||||
|
|
||||||
public function getDefaultValue(PersonIdentifierDefinition $definition): array
|
public function getDefaultValue(PersonIdentifierDefinition $definition): array
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ final class ValidIdentifierConstraintValidatorTest extends ConstraintValidatorTe
|
|||||||
|
|
||||||
// engine that returns one violation
|
// engine that returns one violation
|
||||||
$engine = new class ([$violation]) implements PersonIdentifierEngineInterface {
|
$engine = new class ([$violation]) implements PersonIdentifierEngineInterface {
|
||||||
public function __construct(private array $violations) {}
|
public function __construct(private readonly array $violations) {}
|
||||||
|
|
||||||
public static function getName(): string
|
public static function getName(): string
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user