Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
53 | 32 | public function compile_to_source(array &$custom_closures) { |
|
54 | 32 | $name = $this->name; |
|
55 | // If we didn't do this, backslash would not be escaped enough when |
||
56 | // eval'ing them. |
||
57 | 32 | $regexp = '%^'.str_replace("\\", "\\\\", $this->regexp->raw()).'$%'; |
|
58 | return |
||
59 | " \$value = \n". |
||
60 | 32 | " \$e->has_property(\"$name\")\n". |
|
61 | 32 | " && (preg_match(\"$regexp\", \$e->property(\"$name\")) == 1);\n"; |
|
62 | } |
||
63 | |||
71 |
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..