1.2.286. 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.286.1. Connex PHP features¶
1.2.286.1.1. Suggestions¶
Add the
inttypehint to the function.
1.2.286.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 |