Skip to content

Commit 690656d

Browse files
authored
chore: enable bc rules in php-cs-fixer (#4873)
1 parent 9c95c8b commit 690656d

File tree

64 files changed

+73
-209
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+73
-209
lines changed

.php-cs-fixer.dist.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,9 @@
7575
],
7676
],
7777
'no_superfluous_elseif' => true,
78-
// To re-enable in API Platform 3: https://github.com/symfony/symfony/issues/43021
79-
//'no_superfluous_phpdoc_tags' => [
80-
// 'allow_mixed' => false,
81-
//],
78+
'no_superfluous_phpdoc_tags' => [
79+
'allow_mixed' => false,
80+
],
8281
'no_unset_cast' => true,
8382
'no_unset_on_property' => true,
8483
'no_useless_else' => true,
@@ -114,6 +113,5 @@
114113
'property',
115114
],
116115
],
117-
'void_return' => false, // BC breaks; to be done in API Platform 3.0
118116
])
119117
->setFinder($finder);

src/Action/NotFoundAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
final class NotFoundAction
2222
{
23-
public function __invoke()
23+
public function __invoke(): void
2424
{
2525
throw new NotFoundHttpException();
2626
}

src/Api/IdentifiersExtractor.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ public function getIdentifiersFromItem($item, Operation $operation = null, array
8383

8484
/**
8585
* Gets the value of the given class property.
86-
*
87-
* @param mixed $item
8886
*/
8987
private function getIdentifierValue($item, string $class, string $property, string $parameterName)
9088
{

src/Api/ResourceClassResolverInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ interface ResourceClassResolverInterface
2727
*
2828
* @param string $resourceClass The expected resource class
2929
* @param bool $strict If true, value must match the expected resource class
30-
* @param mixed $value
3130
*
3231
* @throws InvalidArgumentException
3332
*/

src/Doctrine/Common/State/PersistProcessor.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ public function process($data, Operation $operation, array $uriVariables = [], a
4747

4848
/**
4949
* Gets the Doctrine object manager associated with given data.
50-
*
51-
* @param mixed $data
5250
*/
5351
private function getManager($data): ?DoctrineObjectManager
5452
{
@@ -57,8 +55,6 @@ private function getManager($data): ?DoctrineObjectManager
5755

5856
/**
5957
* Checks if doctrine does not manage data automatically.
60-
*
61-
* @param mixed $data
6258
*/
6359
private function isDeferredExplicit(DoctrineObjectManager $manager, $data): bool
6460
{

src/Doctrine/Common/State/RemoveProcessor.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ public function process($data, Operation $operation, array $uriVariables = [], a
3939

4040
/**
4141
* Gets the Doctrine object manager associated with given data.
42-
*
43-
* @param mixed $data
4442
*/
4543
private function getManager($data): ?DoctrineObjectManager
4644
{

src/Doctrine/Odm/Filter/AbstractFilter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ public function apply(Builder $aggregationBuilder, string $resourceClass, Operat
5454

5555
/**
5656
* Passes a property through the filter.
57-
*
58-
* @param mixed $value
5957
*/
6058
abstract protected function filterProperty(string $property, $value, Builder $aggregationBuilder, string $resourceClass, Operation $operation = null, array &$context = []);
6159

src/Doctrine/Odm/Filter/DateFilter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ protected function filterProperty(string $property, $values, Builder $aggregatio
108108

109109
/**
110110
* Adds the match stage according to the chosen null management.
111-
*
112-
* @param mixed $value
113111
*/
114112
private function addMatch(Builder $aggregationBuilder, string $field, string $operator, $value, string $nullManagement = null): void
115113
{

src/Doctrine/Orm/Filter/AbstractFilter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ public function apply(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $q
4646

4747
/**
4848
* Passes a property through the filter.
49-
*
50-
* @param mixed $value
5149
*/
5250
abstract protected function filterProperty(string $property, $value, QueryBuilder $queryBuilder, QueryNameGeneratorInterface $queryNameGenerator, string $resourceClass, Operation $operation = null, array $context = []);
5351

src/Elasticsearch/Serializer/ItemNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function supportsNormalization(mixed $data, string $format = null, array
9797
*
9898
* @throws LogicException
9999
*/
100-
public function setSerializer(SerializerInterface $serializer)
100+
public function setSerializer(SerializerInterface $serializer): void
101101
{
102102
if (!$this->decorated instanceof SerializerAwareInterface) {
103103
throw new LogicException(sprintf('The decorated normalizer must be an instance of "%s".', SerializerAwareInterface::class));

0 commit comments

Comments
 (0)