Documentation

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

Properties

$number_of_tasks

protected int|null $number_of_tasks = null

$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

setErrorReporting()

public setErrorReporting() : void

start()

public start(int $number_of_tasks) : void
Parameters
$number_of_tasks : int

startAnalyzingFiles()

public startAnalyzingFiles() : 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
bool

getOverview()

protected getOverview() : string
Return values
string

renderInnerProgressBar()

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
Tags
see
https://en.wikipedia.org/wiki/Block_Elements
Return values
string

        
On this page

Search results