1.2.287. Could Type With Int¶
That argument may be typed with int
.
<?php
// $a is used with a function which requires an int.
function foo($a) {
return chr($a);
}
?>
See also Type declarations.
1.2.287.1. Connex PHP features¶
1.2.287.1.1. Suggestions¶
Add the
int
typehint to the function.
1.2.287.1.2. Specs¶
Short name |
Functions/CouldTypeWithInt |
Rulesets |
|
Exakat since |
1.9.9 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |