1.2.1083. Set Class Property Definition With Typehint¶
Links method call to its definition, thanks to property typehinting. The link is DEFINITION
.
<?php
class x {
public x $p = null;
public function bar() {
return $this;
}
}
$x = new x;
// $x->p is of 'x' class
$x->p->bar();
?>
1.2.1083.1. Specs¶
Short name |
Complete/SetClassPropertyDefinitionWithTypehint |
Rulesets |
|
Exakat since |
1.9.3 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
High |
Available in |