Issues (39)

src/Normalizer/NormalizerLoaderInterface.php (2 issues)

1
<?php
2
3
namespace Bdf\Serializer\Normalizer;
4
5
use Bdf\Serializer\Exception\UnexpectedValueException;
6
7
/**
8
 * Interface NormalizerLoaderInterface
9
 */
10
interface NormalizerLoaderInterface
11
{
12
    /**
13
     * Get the object normalizer
14
     *
15
     * @param class-string<T>|T $className
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string<T>|T at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string<T>|T.
Loading history...
16
     *
17
     * @return NormalizerInterface<T>
18
     *
19
     * @throws UnexpectedValueException  if no normalizer has been found
20
     * @template T as object
21
     */
22
    public function getNormalizer($className): NormalizerInterface;
23
24
    /**
25
     * Associate a normalizer to a class name
26
     *
27
     * @param class-string $className
0 ignored issues
show
Documentation Bug introduced by
The doc comment class-string at position 0 could not be parsed: Unknown type name 'class-string' at position 0 in class-string.
Loading history...
28
     * @param NormalizerInterface $normalizer
29
     *
30
     * @return $this
31
     */
32
    public function associate($className, NormalizerInterface $normalizer);
33
34
    /**
35
     * Register a normalizer
36
     *
37
     * @param NormalizerInterface $normalizer
38
     *
39
     * @return $this
40
     */
41
    public function addNormalizer(NormalizerInterface $normalizer);
42
}
43