1.2.340. Definitions Only¶
File is definition only.
Definition-only files only include structure definitions : class, functions, traits, interfaces, constants, global, declare(), use and include().
Some functioncalls are also considered definition only, as they configure PHP, but don’t process data : * ini_set() * error_reporting * register_shutdown_function() * set_session_handler() * set_error_handler() * spl_autoload_register() File A : File B :
<?php
// This file has only definitions
function foo() {}
define('a', 1);
class bar {}
?>
1.2.340.1. Connex PHP features¶
1.2.340.1.1. Specs¶
Short name |
Files/DefinitionsOnly |
Rulesets |
|
Exakat since |
0.8.4 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |