Debian Codegraph @

vendor/symfony/type-info/TypeResolver/TypeResolverInterface.php

raw
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\TypeInfo\TypeResolver;
13
14 use Symfony\Component\TypeInfo\Exception\UnsupportedException;
15 use Symfony\Component\TypeInfo\Type;
16 use Symfony\Component\TypeInfo\TypeContext\TypeContext;
17
18 /**
19 * Resolves type for a given subject.
20 *
21 * @author Mathias Arlaud <[email protected]>
22 * @author Baptiste Leduc <[email protected]>
23 */
24 interface TypeResolverInterface
25 {
26 /**
27 * Try to resolve a {@see Type} on a $subject.
28 * If the resolver cannot resolve the type, it will throw a {@see UnsupportedException}.
29 *
30 * @throws UnsupportedException
31 */
32 public function resolve(mixed $subject, ?TypeContext $typeContext = null): Type;
33 }