本文整理汇总了PHP中CLI::progress方法的典型用法代码示例。如果您正苦于以下问题:PHP CLI::progress方法的具体用法?PHP CLI::progress怎么用?PHP CLI::progress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLI
的用法示例。
在下文中一共展示了CLI::progress方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dependencyFileList
/**
* @param CodeBase $code_base
* A code base needs to be passed in because we require
* it to be initialized before any classes or files are
* loaded.
*
* @param string[] $file_path_list
* A set of files to expand with the set of dependencies
* on those files.
*
* @return string[]
* Get the set of dependencies for a given file list
*/
public static function dependencyFileList(CodeBase $code_base, array $file_path_list) : array
{
$file_count = count($file_path_list);
// We'll construct a set of files that we'll
// want to run an analysis on
$dependency_file_path_list = [];
foreach ($file_path_list as $i => $file_path) {
CLI::progress('dependencies', ($i + 1) / $file_count);
$dependency_file_path_list[] = $file_path;
$dependency_file_path_list = array_merge($dependency_file_path_list, $code_base->dependencyListForFile($file_path));
}
return array_unique($dependency_file_path_list);
}