Пример #1
0
 /**
  * @dataProvider trim_file_paths_dp
  */
 public function test_trim_file_paths($data, $path, $expected)
 {
     Filesystem::trimFilePaths($data, $path);
     $this->assertEquals($expected, $data);
 }
Пример #2
0
}
$start = microtime(true);
foreach ($analyzers as $a) {
    try {
        echo "Analyzing {$a->describe()}.";
        $s = microtime(true);
        $a->analyze($data);
        $d = microtime(true) - $s;
        echo ' (' . round($d, 2) . "s)\n";
    } catch (Exception $e) {
        elog($e->getMessage());
    }
}
$dur = microtime(true) - $start;
echo "Analyzing using " . count($analyzers) . " analyzers took {$dur} s.\n";
Filesystem::trimFilePaths($data, $input_path);
switch ($report_t) {
    case 'stdout':
        $reporter = new StdoutReporter($data, $report_f);
        break;
    case 'text':
        $reporter = new TextReporter($data, $report_f);
        break;
    case 'html':
        $reporter = new HTMLReporter($data, $report_f);
        break;
    case 'diagram':
        if (!isset($dt)) {
            printf('Data type (-dt) not set. Defaulting to \'sloc:complexity\'%s', PHP_EOL);
            $dt = 'sloc:complexity';
        }