File tree Expand file tree Collapse file tree 5 files changed +77
-33
lines changed
Expand file tree Collapse file tree 5 files changed +77
-33
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace TypeLang \Reader ;
6+
7+ use TypeLang \Parser \Node \Stmt \TypeStatement ;
8+ use TypeLang \Reader \Exception \ReaderExceptionInterface ;
9+
10+ interface ConstantReaderInterface
11+ {
12+ /**
13+ * Returns a type AST structure based on an {@see ReflectionClassConstant} object.
14+ *
15+ * @throws ReaderExceptionInterface In case of any reading error occurs.
16+ */
17+ public function findConstantType (\ReflectionClassConstant $ constant ): ?TypeStatement ;
18+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace TypeLang \Reader ;
6+
7+ use TypeLang \Parser \Node \Stmt \TypeStatement ;
8+ use TypeLang \Reader \Exception \ReaderExceptionInterface ;
9+
10+ interface FunctionReaderInterface
11+ {
12+ /**
13+ * Returns a type AST structure based on an {@see ReflectionFunctionAbstract} object.
14+ *
15+ * @throws ReaderExceptionInterface In case of any reading error occurs.
16+ */
17+ public function findFunctionType (\ReflectionFunctionAbstract $ function ): ?TypeStatement ;
18+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace TypeLang \Reader ;
6+
7+ use TypeLang \Parser \Node \Stmt \TypeStatement ;
8+ use TypeLang \Reader \Exception \ReaderExceptionInterface ;
9+
10+ interface ParameterReaderInterface
11+ {
12+ /**
13+ * Returns a type AST structure based on an {@see ReflectionParameter} object.
14+ *
15+ * @throws ReaderExceptionInterface In case of any reading error occurs.
16+ */
17+ public function findParameterType (\ReflectionParameter $ parameter ): ?TypeStatement ;
18+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace TypeLang \Reader ;
6+
7+ use TypeLang \Parser \Node \Stmt \TypeStatement ;
8+ use TypeLang \Reader \Exception \ReaderExceptionInterface ;
9+
10+ interface PropertyReaderInterface
11+ {
12+ /**
13+ * Returns a type AST structure based on an {@see ReflectionProperty} object.
14+ *
15+ * @throws ReaderExceptionInterface In case of any reading error occurs.
16+ */
17+ public function findPropertyType (\ReflectionProperty $ property ): ?TypeStatement ;
18+ }
Original file line number Diff line number Diff line change 44
55namespace TypeLang \Reader ;
66
7- use TypeLang \Parser \Node \Stmt \TypeStatement ;
8- use TypeLang \Reader \Exception \ReaderExceptionInterface ;
9-
10- interface ReaderInterface
11- {
12- /**
13- * Returns a type AST structure based on an {@see ReflectionProperty} object.
14- *
15- * @throws ReaderExceptionInterface In case of any reading error occurs.
16- */
17- public function findPropertyType (\ReflectionProperty $ property ): ?TypeStatement ;
18-
19- /**
20- * Returns a type AST structure based on an {@see ReflectionFunctionAbstract} object.
21- *
22- * @throws ReaderExceptionInterface In case of any reading error occurs.
23- */
24- public function findFunctionType (\ReflectionFunctionAbstract $ function ): ?TypeStatement ;
25-
26- /**
27- * Returns a type AST structure based on an {@see ReflectionParameter} object.
28- *
29- * @throws ReaderExceptionInterface In case of any reading error occurs.
30- */
31- public function findParameterType (\ReflectionParameter $ parameter ): ?TypeStatement ;
32-
33- /**
34- * Returns a type AST structure based on an {@see ReflectionClassConstant} object.
35- *
36- * @throws ReaderExceptionInterface In case of any reading error occurs.
37- */
38- public function findConstantType (\ReflectionClassConstant $ constant ): ?TypeStatement ;
39- }
7+ interface ReaderInterface extends
8+ ConstantReaderInterface,
9+ PropertyReaderInterface,
10+ FunctionReaderInterface,
11+ ParameterReaderInterface {}
You can’t perform that action at this time.
0 commit comments