1 | <?php |
||
13 | class TypeResolver |
||
14 | { |
||
15 | /** |
||
16 | * @var PhpParser |
||
17 | */ |
||
18 | private $phpParser; |
||
19 | |||
20 | /** |
||
21 | * @param PhpParser $phpParser |
||
22 | */ |
||
23 | public function __construct(PhpParser $phpParser) |
||
27 | |||
28 | /** |
||
29 | * @param \ReflectionProperty $reflectionProperty |
||
30 | * |
||
31 | * @return null|string |
||
32 | */ |
||
33 | public function resolvePropertyType(\ReflectionProperty $reflectionProperty) |
||
37 | |||
38 | /** |
||
39 | * @param \ReflectionFunctionAbstract $reflectionFunction |
||
40 | * |
||
41 | * @return string |
||
42 | */ |
||
43 | public function resolveFunctionReturnType(\ReflectionFunctionAbstract $reflectionFunction) |
||
47 | |||
48 | /** |
||
49 | * @param \Reflector $reflector |
||
50 | * @param string $tagName |
||
51 | * |
||
52 | * @return string|null |
||
53 | */ |
||
54 | public function resolveElementType(\Reflector $reflector, $tagName) |
||
76 | |||
77 | /** |
||
78 | * @param string $type |
||
79 | * |
||
80 | * @return bool |
||
81 | */ |
||
82 | protected function isTypeObject($type) |
||
105 | |||
106 | private function resolveClassName($type, \ReflectionClass $usingClass) |
||
125 | |||
126 | /** |
||
127 | * @param string $type |
||
128 | * |
||
129 | * @return string|null |
||
130 | */ |
||
131 | public function extractTypeFromCollectionType($type) |
||
141 | } |
||
142 |