1.2.710. Missing Typehint¶
No typehint was found for a parameter, a return type for a method or a property.
void is considered a specified typehint, and is not reported here.
<?php
class x {
private $no_property;
function foo($no_typehint) : void {}
function no_return_type() {}
}
?>
See also Type Declaration.
1.2.710.1. Connex PHP features¶
1.2.710.1.1. Suggestions¶
Add a type to the argument, property or method
1.2.710.1.2. Specs¶
Short name |
Functions/MissingTypehint |
Rulesets |
|
Exakat since |
2.0.5 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |