Documentation

Loc extends Base
in package

Measure the size and analyze the structure of a PHP component.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2013-2020 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

$_config  : Config
$_component  : Component|null
The component that should be checked
$_name  : string|null
The task name.
$_output  : Output
$_tasks  : Tasks
__construct()  : mixed
Constructor.
getName()  : string
Get the name of this task.
run()  : int
Run the task.
setComponent()  : void
Set the component this task should act upon.
setName()  : void
Set the name of this task.
validate()  : array<string|int, mixed>
Validate the preconditions required for this release task.
_printResult()  : void
Prints a result set.
exec()  : SystemCallResult
Run a system call and capture output.
execInDirectory()  : SystemCallResult
Run a system call in a given dir and capture output.
getComponent()  : Component
Get the component this task should act upon.
getOutput()  : Output
Get the output handler.
getTasks()  : Tasks
Get the tasks handler.
system()  : string
Run a system call.
systemInDirectory()  : string
Run a system call.

Properties

$_component

The component that should be checked

private Component|null $_component = null

$_name

The task name.

private string|null $_name = null

Methods

__construct()

Constructor.

public __construct(Config $_config, Tasks $_tasks, Output $_output) : mixed
Parameters
$_config : Config

The configuration for the current job.

$_tasks : Tasks

The task handler.

$_output : Output

Accepts output.

Return values
mixed

getName()

Get the name of this task.

public getName() : string
Return values
string

The task name.

run()

Run the task.

public run([array<string|int, mixed> &$options = [] ]) : int
Parameters
$options : array<string|int, mixed> = []

Additional options.

Return values
int

Number of errors.

setComponent()

Set the component this task should act upon.

public setComponent(Component $component) : void
Parameters
$component : Component

The component to be checked.

Return values
void

setName()

Set the name of this task.

public setName(string $name) : void
Parameters
$name : string

The task name.

Return values
void

validate()

Validate the preconditions required for this release task.

public validate([array<string|int, mixed> $options = [] ]) : array<string|int, mixed>
Parameters
$options : array<string|int, mixed> = []

Additional options.

Return values
array<string|int, mixed>

An empty array if all preconditions are met and a list of error messages otherwise.

_printResult()

Prints a result set.

protected _printResult(array<string|int, mixed> $count) : void
Parameters
$count : array<string|int, mixed>
Return values
void

execInDirectory()

Run a system call in a given dir and capture output.

protected execInDirectory(string $call, string $target_dir) : SystemCallResult
Parameters
$call : string

The system call to execute.

$target_dir : string

Run the command in the provided target path.

Return values
SystemCallResult

The command output.

getComponent()

Get the component this task should act upon.

protected getComponent() : Component
Return values
Component

The component to be checked.

getOutput()

Get the output handler.

protected getOutput() : Output
Return values
Output

The output handler.

getTasks()

Get the tasks handler.

protected getTasks() : Tasks
Return values
Tasks

The release tasks handler.

system()

Run a system call.

protected system(string $call) : string
Parameters
$call : string

The system call to execute.

Return values
string

The command output.

systemInDirectory()

Run a system call.

protected systemInDirectory(string $call, string $target_dir) : string
Parameters
$call : string

The system call to execute.

$target_dir : string

Run the command in the provided target path.

Return values
string

The command output.

Search results