Skip to content

Commit d2f5e74

Browse files
committed
remove inheritdoc PHPDoc
1 parent c15749d commit d2f5e74

File tree

7 files changed

+22
-62
lines changed

7 files changed

+22
-62
lines changed

core/file-upload.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,6 @@ final class MultipartDecoder implements DecoderInterface
408408

409409
public function __construct(private RequestStack $requestStack) {}
410410

411-
/**
412-
* {@inheritdoc}
413-
*/
414411
public function decode(string $data, string $format, array $context = []): ?array
415412
{
416413
$request = $this->requestStack->getCurrentRequest();
@@ -427,9 +424,6 @@ final class MultipartDecoder implements DecoderInterface
427424
}, $request->request->all()) + $request->files->all();
428425
}
429426

430-
/**
431-
* {@inheritdoc}
432-
*/
433427
public function supportsDecoding(string $format): bool
434428
{
435429
return self::FORMAT === $format;
@@ -452,17 +446,11 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
452446

453447
final class UploadedFileDenormalizer implements DenormalizerInterface
454448
{
455-
/**
456-
* {@inheritdoc}
457-
*/
458449
public function denormalize($data, string $type, string $format = null, array $context = []): UploadedFile
459450
{
460451
return $data;
461452
}
462453

463-
/**
464-
* {@inheritdoc}
465-
*/
466454
public function supportsDenormalization($data, $type, $format = null): bool
467455
{
468456
return $data instanceof UploadedFile;

core/graphql.md

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -888,9 +888,6 @@ final class WriteStage implements WriteStageInterface
888888
$this->writeStage = $writeStage;
889889
}
890890
891-
/**
892-
* {@inheritdoc}
893-
*/
894891
public function __invoke($data, string $resourceClass, string $operationName, array $context)
895892
{
896893
// You can add pre-write code here.
@@ -2192,9 +2189,6 @@ final class ErrorHandler implements ErrorHandlerInterface
21922189
$this->defaultErrorHandler = $defaultErrorHandler;
21932190
}
21942191
2195-
/**
2196-
* {@inheritdoc}
2197-
*/
21982192
public function __invoke(array $errors, callable $formatter): array
21992193
{
22002194
// Log or filter the errors.
@@ -2285,9 +2279,6 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
22852279
22862280
final class MyExceptionNormalizer implements NormalizerInterface
22872281
{
2288-
/**
2289-
* {@inheritdoc}
2290-
*/
22912282
public function normalize($object, $format = null, array $context = []): array
22922283
{
22932284
$exception = $object->getPrevious();
@@ -2299,9 +2290,6 @@ final class MyExceptionNormalizer implements NormalizerInterface
22992290
return $error;
23002291
}
23012292
2302-
/**
2303-
* {@inheritdoc}
2304-
*/
23052293
public function supportsNormalization($data, $format = null): bool
23062294
{
23072295
return $data instanceof Error && $data->getPrevious() instanceof MyException;
@@ -2486,9 +2474,6 @@ final class DateTimeType extends ScalarType implements TypeInterface
24862474
return $this->name;
24872475
}
24882476

2489-
/**
2490-
* {@inheritdoc}
2491-
*/
24922477
public function serialize($value)
24932478
{
24942479
// Already serialized.
@@ -2503,10 +2488,7 @@ final class DateTimeType extends ScalarType implements TypeInterface
25032488
return $value->format(\DateTime::ATOM);
25042489
}
25052490

2506-
/**
2507-
* {@inheritdoc}
2508-
*/
2509-
public function parseValue($value)
2491+
public function parseValue($value)
25102492
{
25112493
if (!\is_string($value)) {
25122494
throw new Error(sprintf('DateTime cannot represent non string value: %s', Utils::printSafeJson($value)));
@@ -2520,9 +2502,6 @@ final class DateTimeType extends ScalarType implements TypeInterface
25202502
return $value;
25212503
}
25222504

2523-
/**
2524-
* {@inheritdoc}
2525-
*/
25262505
public function parseLiteral($valueNode, ?array $variables = null)
25272506
{
25282507
if ($valueNode instanceof StringValueNode && false !== \DateTime::createFromFormat(\DateTime::ATOM, $valueNode->value)) {
@@ -2593,9 +2572,6 @@ final class TypeConverter implements TypeConverterInterface
25932572
$this->defaultTypeConverter = $defaultTypeConverter;
25942573
}
25952574
2596-
/**
2597-
* {@inheritdoc}
2598-
*/
25992575
public function convertType(Type $type, bool $input, Operation $rootOperation, string $resourceClass, string $rootResource, ?string $property, int $depth)
26002576
{
26012577
if ('publicationDate' === $property
@@ -2607,9 +2583,6 @@ final class TypeConverter implements TypeConverterInterface
26072583
return $this->defaultTypeConverter->convertType($type, $input, $rootOperation, $resourceClass, $rootResource, $property, $depth);
26082584
}
26092585
2610-
/**
2611-
* {@inheritdoc}
2612-
*/
26132586
public function resolveType(string $type): ?GraphQLType
26142587
{
26152588
return $this->defaultTypeConverter->resolveType($type);

core/identifiers.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Let's create a `Provider` for the `Person` entity:
6363

6464
```php
6565
<?php
66+
// api/src/State/PersonProvider.php
6667
namespace App\State;
6768

6869
use App\Entity\Person;
@@ -71,9 +72,6 @@ use App\Uuid;
7172

7273
final class PersonProvider implements ProviderInterface
7374
{
74-
/**
75-
* {@inheritDoc}
76-
*/
7775
public function provide(Operation $operation, array $uriVariables = [], array $context = [])
7876
{
7977
// Our identifier is:
@@ -89,6 +87,7 @@ This case is covered by an URI variable transformer:
8987

9088
```php
9189
<?php
90+
// api/src/Identifier/UuidUriVariableTransformer.php
9291
namespace App\Identifier;
9392

9493
use ApiPlatform\Api\UriVariableTransformerInterface;

core/serialization.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,19 +594,13 @@ class PlainIdentifierDenormalizer implements ContextAwareDenormalizerInterface,
594594
$this->iriConverter = $iriConverter;
595595
}
596596
597-
/**
598-
* {@inheritdoc}
599-
*/
600597
public function denormalize($data, $class, $format = null, array $context = [])
601598
{
602599
$data['relatedDummy'] = $this->iriConverter->getIriFromResource(resource: RelatedDummy::class, context: ['uri_variables' => ['id' => $data['relatedDummy']]]);
603600
604601
return $this->denormalizer->denormalize($data, $class, $format, $context + [__CLASS__ => true]);
605602
}
606603
607-
/**
608-
* {@inheritdoc}
609-
*/
610604
public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
611605
{
612606
return \in_array($format, ['json', 'jsonld'], true) && is_a($type, Dummy::class, true) && !empty($data['relatedDummy']) && !isset($context[__CLASS__]);
@@ -624,6 +618,7 @@ For instance:
624618
```php
625619
<?php
626620
// api/src/Entity/Book.php
621+
627622
namespace App\Entity;
628623
629624
use ApiPlatform\Metadata\ApiResource;
@@ -657,6 +652,7 @@ It's also possible to only change the denormalization or normalization context:
657652
```php
658653
<?php
659654
// api/src/Entity/Book.php
655+
660656
namespace App\Entity;
661657
662658
use ApiPlatform\Metadata\ApiResource;
@@ -679,6 +675,7 @@ Groups are also supported:
679675
```php
680676
<?php
681677
// api/src/Entity/Book.php
678+
682679
namespace App\Entity;
683680
684681
use ApiPlatform\Metadata\ApiResource;
@@ -711,6 +708,7 @@ Sometimes you need to expose calculated fields. This can be done by leveraging t
711708
```php
712709
<?php
713710
// api/src/Entity/Greeting.php
711+
714712
namespace App\Entity;
715713
716714
use ApiPlatform\Metadata\ApiResource;

core/state-processors.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Here is an implementation example:
3333

3434
```php
3535
<?php
36+
// api/src/State/BlogPostProcessor.php
3637

3738
namespace App\State;
3839

@@ -42,9 +43,6 @@ use ApiPlatform\State\ProcessorInterface;
4243

4344
class BlogPostProcessor implements ProcessorInterface
4445
{
45-
/**
46-
* {@inheritDoc}
47-
*/
4846
public function process($data, Operation $operation, array $uriVariables = [], array $context = [])
4947
{
5048
// call your persistence layer to save $data
@@ -57,6 +55,7 @@ We then configure our operation to use this processor:
5755

5856
```php
5957
<?php
58+
// api/src/Entity/BlogPost.php
6059

6160
namespace App\Entity;
6261

@@ -74,6 +73,7 @@ Otherwise, if you use a custom dependency injection configuration, you need to r
7473

7574
```yaml
7675
# api/config/services.yaml
76+
7777
services:
7878
# ...
7979
App\State\BlogPostProcessor: ~
@@ -91,6 +91,7 @@ Here is an implementation example which sends new users a welcome email after a
9191

9292
```php
9393
<?php
94+
// api/src/Sate/UserProcessor.php
9495

9596
namespace App\State;
9697

@@ -129,6 +130,7 @@ Even with service autowiring and autoconfiguration enabled, you must still confi
129130

130131
```yaml
131132
# api/config/services.yaml
133+
132134
services:
133135
# ...
134136
App\State\UserProcessor:
@@ -147,6 +149,7 @@ And configure that you want to use this processor on the User resource:
147149

148150
```php
149151
<?php
152+
// api/src/Entity/User.php
150153

151154
namespace App\Entity;
152155

core/state-providers.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ First, your `BlogPostProvider` has to implement the
3333

3434
```php
3535
<?php
36+
// api/src/State/BlogPostProvider.php
3637

3738
namespace App\State;
3839

@@ -42,9 +43,6 @@ use ApiPlatform\State\ProviderInterface;
4243

4344
final class BlogPostProvider implements ProviderInterface
4445
{
45-
/**
46-
* {@inheritDoc}
47-
*/
4846
public function provide(Operation $operation, array $uriVariables = [], array $context = [])
4947
{
5048
return new BlogPost($uriVariables['id']);
@@ -59,6 +57,7 @@ To use this provider we need to configure the provider on the operation:
5957

6058
```php
6159
<?php
60+
// api/src/Entity/BlogPost.php
6261

6362
namespace App\Entity;
6463

@@ -75,6 +74,7 @@ To declare the service explicitly, you can use the following snippet:
7574

7675
```yaml
7776
# api/config/services.yaml
77+
7878
services:
7979
# ...
8080
App\State\BlogPostProvider: ~
@@ -87,6 +87,7 @@ supporting a wider range of operations. Then we can provide a collection of blog
8787

8888
```php
8989
<?php
90+
// api/src/State/BlogPostProvider.php
9091

9192
namespace App\State;
9293

@@ -97,10 +98,7 @@ use ApiPlatform\Metadata\CollectionOperationInterface;
9798

9899
final class BlogPostProvider implements ProviderInterface
99100
{
100-
/**
101-
* {@inheritDoc}
102-
*/
103-
public function provide(Operation $operation, array $uriVariables = [], array $context = [])
101+
public function provide(@Operation $operation, array $uriVariables = [], array $context = [])
104102
{
105103
if ($operation instanceof CollectionOperationInterface) {
106104
return [new BlogPost(), new BlogPost()];
@@ -115,6 +113,7 @@ We then need to configure this same provider on the BlogPost `GetCollection` ope
115113

116114
```php
117115
<?php
116+
// api/src/Entity/BlogPost.php
118117

119118
namespace App\Entity;
120119

@@ -133,6 +132,7 @@ The next example uses a [DTO](https://api-platform.com/docs/core/dto/#using-data
133132

134133
```php
135134
<?php
135+
// api/src/State/BlogPostProvider.php
136136

137137
namespace App\State;
138138

@@ -163,6 +163,7 @@ Even with service autowiring and autoconfiguration enabled, you must still confi
163163

164164
```yaml
165165
# api/config/services.yaml
166+
166167
services:
167168
# ...
168169
App\State\BookRepresentationProvider:
@@ -176,6 +177,7 @@ And configure that you want to use this provider on the Book resource:
176177

177178
```php
178179
<?php
180+
// api/src/Entity/Book.php
179181

180182
namespace App\Entity;
181183

core/validation.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,6 @@ final class AdminGroupsGenerator implements ValidationGroupsGeneratorInterface
255255
$this->authorizationChecker = $authorizationChecker;
256256
}
257257

258-
/**
259-
* {@inheritdoc}
260-
*/
261258
public function __invoke($book): array
262259
{
263260
assert($book instanceof Book);

0 commit comments

Comments
 (0)