Skip to content

Commit 947b5b7

Browse files
committed
Fix docs
1 parent 0698df0 commit 947b5b7

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

src/internals/class-block-normalizer.php

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,7 @@
1616
use Alley\WP\Blocks\Parsed_Block;
1717
use Alley\WP\Types\Serialized_Blocks;
1818
use Alley\WP\Types\Single_Block;
19-
use Symfony\Component\Serializer\Exception\BadMethodCallException;
20-
use Symfony\Component\Serializer\Exception\CircularReferenceException;
21-
use Symfony\Component\Serializer\Exception\ExceptionInterface;
22-
use Symfony\Component\Serializer\Exception\ExtraAttributesException;
2319
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
24-
use Symfony\Component\Serializer\Exception\LogicException;
25-
use Symfony\Component\Serializer\Exception\RuntimeException;
26-
use Symfony\Component\Serializer\Exception\UnexpectedValueException;
2720
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
2821
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
2922

@@ -34,11 +27,7 @@ final class Block_Normalizer implements NormalizerInterface, DenormalizerInterfa
3427
/**
3528
* Normalizes an object into a set of arrays/scalars.
3629
*
37-
* @throws InvalidArgumentException Occurs when the object given is not a supported type for the normalizer.
38-
* @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular
39-
* reference handler can fix it.
40-
* @throws LogicException Occurs when the normalizer is not called in an expected context.
41-
* @throws ExceptionInterface Occurs for all the other cases of errors.
30+
* @throws InvalidArgumentException Occurs when the object given is not a supported type for the normalizer.
4231
*
4332
* @phpstan-param array<mixed> $context
4433
* @phpstan-return array{blockName: ?string, attrs: array<string, mixed>, innerBlocks: Serialized_Blocks, innerHTML: string, origin: string}
@@ -100,13 +89,7 @@ public function getSupportedTypes( ?string $format ): array {
10089
/**
10190
* Denormalizes data back into an object of the given class.
10291
*
103-
* @throws BadMethodCallException Occurs when the normalizer is not called in an expected context.
10492
* @throws InvalidArgumentException Occurs when the arguments are not coherent or not supported.
105-
* @throws UnexpectedValueException Occurs when the item cannot be hydrated with the given data.
106-
* @throws ExtraAttributesException Occurs when the item doesn't have attribute to receive given data.
107-
* @throws LogicException Occurs when the normalizer is not supposed to denormalize.
108-
* @throws RuntimeException Occurs if the class cannot be instantiated.
109-
* @throws ExceptionInterface Occurs for all the other cases of errors.
11093
*
11194
* @phpstan-param array<mixed> $context
11295
*

src/internals/class-blocks-normalizer.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
use Alley\WP\Blocks\Parsed_Block;
1616
use Alley\WP\Types\Serialized_Blocks;
1717
use Alley\WP\Validator\Nonempty_Block;
18-
use Symfony\Component\Serializer\Exception\CircularReferenceException;
19-
use Symfony\Component\Serializer\Exception\ExceptionInterface;
2018
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
21-
use Symfony\Component\Serializer\Exception\LogicException;
2219
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
2320

2421
/**
@@ -42,11 +39,7 @@ public function __construct() {
4239
/**
4340
* Normalizes an object into a set of arrays/scalars.
4441
*
45-
* @throws InvalidArgumentException Occurs when the object given is not a supported type for the normalizer.
46-
* @throws CircularReferenceException Occurs when the normalizer detects a circular reference when no circular
47-
* reference handler can fix it.
48-
* @throws LogicException Occurs when the normalizer is not called in an expected context.
49-
* @throws ExceptionInterface Occurs for all the other cases of errors.
42+
* @throws InvalidArgumentException Occurs when the object given is not a supported type for the normalizer.
5043
*
5144
* @phpstan-param array<mixed> $context
5245
* @phpstan-return array{block?: Parsed_Block[]}

0 commit comments

Comments
 (0)