1 | <?php |
||
16 | class ClosureDefinition extends ParentDefinition |
||
17 | { |
||
18 | /** |
||
19 | * @todo Use Finder |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $filepath; |
||
24 | |||
25 | /** |
||
26 | * @var Node\Stmt\Function_ |
||
27 | */ |
||
28 | protected $statement; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | protected $returnTypes = CompiledExpression::MIXED; |
||
34 | |||
35 | /** |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $possibleReturnTypes = array(); |
||
39 | |||
40 | /** |
||
41 | * @param $name |
||
42 | */ |
||
43 | public function __construct(Node\Expr\Closure $statement) |
||
47 | |||
48 | /** |
||
49 | * Compile function to check it |
||
50 | * |
||
51 | * @param Context $context |
||
52 | * @return bool |
||
53 | */ |
||
54 | public function compile(Context $context) |
||
87 | |||
88 | /** |
||
89 | * @return string |
||
90 | */ |
||
91 | public function getFilepath() |
||
95 | |||
96 | /** |
||
97 | * @param string $filepath |
||
98 | */ |
||
99 | public function setFilepath($filepath) |
||
103 | |||
104 | /** |
||
105 | * @return string |
||
106 | */ |
||
107 | public function getNamespace() |
||
111 | } |
||
112 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..