DefaultProgress
extends LongProgress
in package
Table of Contents
Constants
- NUMBER_OF_COLUMNS = 60
- PROGRESS_BAR_SAMPLE_INTERVAL = 0.1
- TOO_MANY_FILES = 1500
Properties
- $fixed_size : bool
- $in_ci : bool
- $number_of_tasks : int|null
- $print_errors : bool
- $print_infos : bool
- $progress : int
- $previous_update_time : float
Methods
- __construct() : mixed
- alterFileDone() : void
- debug() : void
- expand() : void
- finish() : void
- setErrorReporting() : void
- start() : void
- startAlteringFiles() : void
- startAnalyzingFiles() : void
- startScanningFiles() : void
- taskDone() : void
- warning() : void
- write() : void
- doesTerminalSupportUtf8() : bool
- getOverview() : string
- renderInnerProgressBar() : string
- Fully stolen from https://github.com/phan/phan/blob/d61a624b1384ea220f39927d53fd656a65a75fac/src/Phan/CLI.php Renders a unicode progress bar that goes from light (left) to dark (right) The length in the console is the positive integer $length
Constants
NUMBER_OF_COLUMNS
public
final mixed
NUMBER_OF_COLUMNS
= 60
PROGRESS_BAR_SAMPLE_INTERVAL
private
mixed
PROGRESS_BAR_SAMPLE_INTERVAL
= 0.1
TOO_MANY_FILES
private
mixed
TOO_MANY_FILES
= 1500
Properties
$fixed_size
protected
bool
$fixed_size
= false
$in_ci
protected
bool
$in_ci
= false
$number_of_tasks
protected
int|null
$number_of_tasks
= null
$print_errors
protected
bool
$print_errors
= true
$print_infos
protected
bool
$print_infos
= true
$progress
protected
int
$progress
= 0
$previous_update_time
private
float
$previous_update_time
= 0.0
the last time when the progress bar UI was updated
Methods
__construct()
public
__construct([bool $print_errors = true ][, bool $print_infos = true ][, bool $in_ci = false ]) : mixed
Parameters
- $print_errors : bool = true
- $print_infos : bool = true
- $in_ci : bool = false
alterFileDone()
public
alterFileDone(string $file_name) : void
Parameters
- $file_name : string
debug()
public
debug(string $message) : void
Parameters
- $message : string
expand()
public
expand(int $number_of_tasks) : void
Parameters
- $number_of_tasks : int
finish()
public
finish() : void
setErrorReporting()
public
setErrorReporting() : void
start()
public
start(int $number_of_tasks) : void
Parameters
- $number_of_tasks : int
startAlteringFiles()
public
startAlteringFiles() : void
startAnalyzingFiles()
public
startAnalyzingFiles() : void
startScanningFiles()
public
startScanningFiles() : void
taskDone()
public
taskDone(int $level) : void
Parameters
- $level : int
warning()
public
warning(string $message) : void
Parameters
- $message : string
write()
public
write(string $message) : void
Parameters
- $message : string
doesTerminalSupportUtf8()
protected
static doesTerminalSupportUtf8() : bool
Return values
boolgetOverview()
protected
getOverview() : string
Return values
stringrenderInnerProgressBar()
Fully stolen from https://github.com/phan/phan/blob/d61a624b1384ea220f39927d53fd656a65a75fac/src/Phan/CLI.php Renders a unicode progress bar that goes from light (left) to dark (right) The length in the console is the positive integer $length
private
static renderInnerProgressBar(int $length, float $p) : string
Parameters
- $length : int
- $p : float