1.2.715. Missing Type¶
No type was found for a parameter, a return type for a method or a property.
void is considered a specified type, and is not reported here.
<?php
class x {
private $no_property;
function foo($no_type) : void {}
function no_return_type() {}
}
?>
See also Type Declaration.
1.2.715.1. Connex PHP features¶
1.2.715.1.1. Suggestions¶
Add a type to the argument, property or method
1.2.715.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 |