1 | <?php |
||
21 | class FunctionDefinition extends ParentDefinition |
||
22 | { |
||
23 | /** |
||
24 | * @todo Use Finder |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $filepath; |
||
29 | |||
30 | /** |
||
31 | * @var Node\Stmt\Function_ |
||
32 | */ |
||
33 | protected $statement; |
||
34 | |||
35 | /** |
||
36 | * @var \PHPSA\ControlFlow\ControlFlowGraph |
||
37 | */ |
||
38 | protected $cfg; |
||
39 | |||
40 | /** |
||
41 | * @var int |
||
42 | */ |
||
43 | protected $returnTypes = CompiledExpression::MIXED; |
||
44 | |||
45 | /** |
||
46 | * @var array |
||
47 | */ |
||
48 | protected $possibleReturnTypes = []; |
||
49 | |||
50 | /** |
||
51 | * @param string $name |
||
52 | * @param Node\Stmt\Function_ $statement |
||
53 | */ |
||
54 | 6 | public function __construct($name, Node\Stmt\Function_ $statement) |
|
59 | |||
60 | /** |
||
61 | * Compile function to check it |
||
62 | * |
||
63 | * @param Context $context |
||
64 | * @return bool |
||
65 | */ |
||
66 | 6 | public function compile(Context $context) |
|
116 | |||
117 | /** |
||
118 | * @return string |
||
119 | */ |
||
120 | 6 | public function getFilepath() |
|
124 | |||
125 | /** |
||
126 | * @param string $filepath |
||
127 | */ |
||
128 | 6 | public function setFilepath($filepath) |
|
132 | |||
133 | /** |
||
134 | * @return Node\Param[] |
||
135 | */ |
||
136 | 1 | public function getParams() |
|
140 | |||
141 | /** |
||
142 | * @return \PHPSA\ControlFlow\ControlFlowGraph |
||
143 | */ |
||
144 | public function getCFG() |
||
148 | } |
||
149 |