ManagedWorkspace

Class
Final: Yes

Provides canonical repository-local paths for generated DevTools artifacts.

Table of Contents

Constants

 = 'coverage'
 = 'metrics'
 = 'php-cs-fixer'
 = 'phpdoc'
 = 'phpunit'
 = 'rector'
 = 'cache'
 = '.dev-tools'

Methods

getCacheDirectory()

Returns a repository-local managed cache directory.

 : string
getOutputDirectory()

Returns a repository-local managed output directory.

 : string
Constants

Constants

COVERAGE

Public
public string COVERAGE = 'coverage'

Description

the output segment used for coverage artifacts

METRICS

Public
public string METRICS = 'metrics'

Description

the output segment used for metrics artifacts

PHP_CS_FIXER

Public
public string PHP_CS_FIXER = 'php-cs-fixer'

Description

the cache segment used for PHP-CS-Fixer

PHPDOC

Public
public string PHPDOC = 'phpdoc'

Description

the cache segment used for phpDocumentor

PHPUNIT

Public
public string PHPUNIT = 'phpunit'

Description

the cache segment used for PHPUnit

RECTOR

Public
public string RECTOR = 'rector'

Description

the cache segment used for Rector

CACHE_ROOT

Private
private string CACHE_ROOT = 'cache'

Description

the repository-local root directory for generated tool caches

WORKSPACE_ROOT

Private
private string WORKSPACE_ROOT = '.dev-tools'

Description

the repository-local root directory for generated artifacts

Methods

getCacheDirectory()

Public Static

Returns a repository-local managed cache directory.

public static getCacheDirectory([ string  $path = ''][, string  $baseDir = '']) : string

Description

The optional $path MUST be a relative cache segment, while $baseDir MAY resolve the managed workspace root before the cache directory is appended.

Parameters
$path : string = ''

Description

the optional relative cache segment to append under the managed cache root

$baseDir : string = ''

Description

the optional repository root used to resolve the managed cache path

Return values
string

getOutputDirectory()

Public Static

Returns a repository-local managed output directory.

public static getOutputDirectory([ string  $path = ''][, string  $baseDir = '']) : string

Description

The optional $path MUST be a relative segment within the managed workspace, while $baseDir MAY provide the repository root used to materialize the same .dev-tools structure under a different base path.

Parameters
$path : string = ''

Description

the optional relative segment to append under the managed output root

$baseDir : string = ''

Description

the optional repository root used to resolve the managed workspace path

Return values
string