1.2.670. Maybe Missing New¶
This functioncall looks like a class instantiation that is missing the new keyword.
Any function definition was found for that function, but a class with that name was. New is probably missing.
<?php
// Functioncall
$a = foo();
// Class definition
class foo {}
// Function definition
function foo {}
// Functioncall
$a = BAR;
// Function definition
class bar {}
// Constant definition
const BAR = 1;
?>
1.2.670.1. Connex PHP features¶
1.2.670.1.1. Suggestions¶
Add the new
Rename the class to distinguish it from the function
Rename the function to distinguish it from the class
1.2.670.1.2. Specs¶
Short name |
Structures/MissingNew |
Rulesets |
|
Exakat since |
1.0.4 |
PHP Version |
All |
Severity |
Critical |
Time To Fix |
Instant (5 mins) |
Precision |
Medium |
Available in |