atdrupal / at_base.module

Provide some more API for developer to work with Drupal (7).
https://drupal.org/project/at_base
GNU General Public License v2.0
5 stars 4 forks source link

[Insight] Include statements should not be used #230

Closed and1truong closed 9 years ago

and1truong commented 10 years ago

in lib/Helper/Timer.php, line 114

Using include() or require() bypasses lazy-loading of third-party classes. Prefer using autoloading.

    if (empty($this->xhprof_config)) return array();

    $xhprof_data = xhprof_disable();
    $config = $this->xhprof_config;

    require_once $config['root'] . "/xhprof_lib/utils/xhprof_lib.php";
    require_once $config['root'] . "/xhprof_lib/utils/xhprof_runs.php";

    $xhprof_runs = new \XHProfRuns_Default();
    $run_id = $xhprof_runs->save_run($xhprof_data, 'AndyTruong');

Posted from SensioLabsInsight