1.2.1089. Set Class Remote Definition With Return Typehint¶
Links method call to its definition, thanks to the typed return. The link is DEFINITION
.
<?php
class x {
public function bar() { }
}
function foo() {
$a = bar();
// This links to class x, method bar(), thanks to the new.
return $a->bar();
}
function bar() : x {
return new x;
}
?>
1.2.1089.1. Specs¶
Short name |
Complete/SetClassRemoteDefinitionWithReturnTypehint |
Rulesets |
|
Exakat since |
1.9.3 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |