1.2.252. Could Be CIT¶
Mark arguments and return types that can be set to a class, interface definition.
<?php
// Accept an object as input
function foo($b) {
// Returns new object
return new ($b->classname);
}
?>
1.2.252.1. Connex PHP features¶
1.2.252.1.1. Suggestions¶
Add the class or interface typehint to the code.
1.2.252.1.2. Specs¶
Short name |
Typehints/CouldBeCIT |
Rulesets |
|
Exakat since |
2.1.2 |
PHP Version |
All |
Severity |
Major |
Time To Fix |
Quick (30 mins) |
Precision |
High |
Available in |