Skip to content

Commit 297b4bb

Browse files
Fix cs
1 parent 280197e commit 297b4bb

12 files changed

+146
-106
lines changed

phpcs.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@
3030
</properties>
3131
</rule>
3232
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
33+
<exclude-pattern>stubs</exclude-pattern>
3334
<properties>
3435
<property name="enableNativeTypeHint" value="false"/>
3536
</properties>
3637
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
3738
</rule>
3839
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
40+
<exclude-pattern>stubs</exclude-pattern>
3941
<properties>
4042
<property name="enableObjectTypeHint" value="false"/>
4143
</properties>
Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1-
<?php
1+
<?php declare(strict_types = 1);
22

33
namespace Symfony\Component\Form;
44

55
interface FormTypeExtensionInterface
66
{
77

8-
/**
9-
* @param array<string, mixed> $options
10-
*/
11-
public function buildForm(FormBuilderInterface $builder, array $options): void;
8+
/**
9+
* @param FormBuilderInterface $builder
10+
* @param array<string, mixed> $options
11+
*/
12+
public function buildForm(FormBuilderInterface $builder, array $options): void;
1213

13-
/**
14-
* @param array<string, mixed> $options
15-
*/
16-
public function buildView(FormView $view, FormInterface $form, array $options): void;
14+
/**
15+
* @param FormView $view
16+
* @param FormInterface $form
17+
* @param array<string, mixed> $options
18+
*/
19+
public function buildView(FormView $view, FormInterface $form, array $options): void;
1720

18-
/**
19-
* @param array<string, mixed> $options
20-
*/
21-
public function finishView(FormView $view, FormInterface $form, array $options): void;
21+
/**
22+
* @param FormView $view
23+
* @param FormInterface $form
24+
* @param array<string, mixed> $options
25+
*/
26+
public function finishView(FormView $view, FormInterface $form, array $options): void;
2227

2328
}

stubs/Component/Form/FormTypeInterface.stub

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,21 @@ interface FormTypeInterface
66
{
77

88
/**
9+
* @param FormBuilderInterface $builder
910
* @param array<string, mixed> $options
1011
*/
1112
public function buildForm(FormBuilderInterface $builder, array $options): void;
1213

1314
/**
15+
* @param FormView $view
16+
* @param FormBuilderInterface $builder
1417
* @param array<string, mixed> $options
1518
*/
1619
public function buildView(FormView $view, FormInterface $form, array $options): void;
1720

1821
/**
22+
* @param FormView $view
23+
* @param FormBuilderInterface $builder
1924
* @param array<string, mixed> $options
2025
*/
2126
public function finishView(FormView $view, FormInterface $form, array $options): void;
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
<?php
1+
<?php declare(strict_types = 1);
22

33
namespace Symfony\Component\Serializer\Encoder;
44

55
interface ContextAwareDecoderInterface extends DecoderInterface
66
{
7-
/**
8-
* @param string $format
9-
* @param array<mixed> $context
10-
* @return bool
11-
*/
12-
public function supportsDecoding($format, array $context = []);
7+
8+
/**
9+
* @param string $format
10+
* @param array<mixed> $context
11+
*
12+
* @return bool
13+
*/
14+
public function supportsDecoding($format, array $context = []);
15+
1316
}
Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
<?php
1+
<?php declare(strict_types = 1);
22

33
namespace Symfony\Component\Serializer\Encoder;
44

5-
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
6-
75
interface DecoderInterface
86
{
9-
/**
10-
* @param string $data
11-
* @param string $format
12-
* @param array<mixed> $context
13-
* @return mixed
14-
*/
15-
public function decode($data, $format, array $context = []);
167

17-
/**
18-
* @param string $format Format name
19-
* @return bool
20-
*/
21-
public function supportsDecoding($format);
8+
/**
9+
* @param string $data
10+
* @param string $format
11+
* @param array<mixed> $context
12+
*
13+
* @return mixed
14+
*/
15+
public function decode($data, $format, array $context = []);
16+
17+
/**
18+
* @param string $format Format name
19+
*
20+
* @return bool
21+
*/
22+
public function supportsDecoding($format);
23+
2224
}
Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
<?php
1+
<?php declare(strict_types = 1);
22

33
namespace Symfony\Component\Serializer\Encoder;
44

55
interface EncoderInterface
66
{
7-
/**
8-
* @param mixed $data
9-
* @param string $format
10-
* @param array<mixed> $context
11-
* @return string|int|float|bool
12-
*/
13-
public function encode($data, $format, array $context = []);
147

15-
/**
16-
* @param string $format Format name
17-
* @return bool
18-
*/
19-
public function supportsEncoding($format);
8+
/**
9+
* @param mixed $data
10+
* @param string $format
11+
* @param array<mixed> $context
12+
*
13+
* @return string|int|float|bool
14+
*/
15+
public function encode($data, $format, array $context = []);
16+
17+
/**
18+
* @param string $format Format name
19+
*
20+
* @return bool
21+
*/
22+
public function supportsEncoding($format);
23+
2024
}
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
<?php
1+
<?php declare(strict_types = 1);
22

33
namespace Symfony\Component\Serializer\Normalizer;
44

55
interface ContextAwareDenormalizerInterface extends DenormalizerInterface
66
{
7-
/**
8-
* @param mixed $data
9-
* @param string $format
10-
* @param array<mixed> $context
11-
* @return bool
12-
*/
13-
public function supportsDenormalization($data, $type, $format = null, array $context = []);
7+
8+
/**
9+
* @param mixed $data
10+
* @param string $type
11+
* @param string $format
12+
* @param array<mixed> $context
13+
*
14+
* @return bool
15+
*/
16+
public function supportsDenormalization($data, $type, $format = null, array $context = []);
17+
1418
}
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
<?php
1+
<?php declare(strict_types = 1);
22

33
namespace Symfony\Component\Serializer\Normalizer;
44

55
interface ContextAwareNormalizerInterface extends NormalizerInterface
66
{
7-
/**
8-
* @param mixed $data
9-
* @param string $format
10-
* @param array<mixed> $context
11-
* @return bool
12-
*/
13-
public function supportsNormalization($data, $format = null, array $context = []);
7+
8+
/**
9+
* @param mixed $data
10+
* @param string $format
11+
* @param array<mixed> $context
12+
*
13+
* @return bool
14+
*/
15+
public function supportsNormalization($data, $format = null, array $context = []);
16+
1417
}
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
<?php
1+
<?php declare(strict_types = 1);
22

33
namespace Symfony\Component\Serializer\Normalizer;
44

55
interface DenormalizableInterface
66
{
7-
/**
8-
* @param DenormalizerInterface $denormalizer
9-
* @param array<mixed>|string|int|float|bool $data
10-
* @param string|null $format
11-
* @param array<mixed> $context
12-
*
13-
* @return object|object[]
14-
*/
15-
public function denormalize($denormalizer, $data, $format = null, array $context = []);
7+
8+
/**
9+
* @param DenormalizerInterface $denormalizer
10+
* @param array<mixed>|string|int|float|bool $data
11+
* @param string|null $format
12+
* @param array<mixed> $context
13+
*
14+
* @return object|object[]
15+
*/
16+
public function denormalize($denormalizer, $data, $format = null, array $context = []);
17+
1618
}
Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
<?php
1+
<?php declare(strict_types = 1);
22

33
namespace Symfony\Component\Serializer\Normalizer;
44

55
interface DenormalizerInterface
66
{
7-
/**
8-
* @param mixed $data
9-
* @param string $type
10-
* @param string $format
11-
* @param array<mixed> $context
12-
* @return object|array<mixed>
13-
*/
14-
public function denormalize($data, $type, $format = null, array $context = []);
157

16-
/**
17-
* @param mixed $data
18-
* @param string $type
19-
* @param string $format
20-
* @return bool
21-
*/
22-
public function supportsDenormalization($data, $type, $format = null);
8+
/**
9+
* @param mixed $data
10+
* @param string $type
11+
* @param string $format
12+
* @param array<mixed> $context
13+
*
14+
* @return object|array<mixed>
15+
*/
16+
public function denormalize($data, $type, $format = null, array $context = []);
17+
18+
/**
19+
* @param mixed $data
20+
* @param string $type
21+
* @param string $format
22+
*
23+
* @return bool
24+
*/
25+
public function supportsDenormalization($data, $type, $format = null);
26+
2327
}

0 commit comments

Comments
 (0)