-
-
Notifications
You must be signed in to change notification settings - Fork 0
ManagedWorkspace
Provides canonical repository-local paths for generated DevTools artifacts.
- Full name:
\FastForward\DevTools\Path\ManagedWorkspace - This class is marked as final and can't be subclassed
- This class is a Final class
| Constant | Visibility | Type | Value |
|---|---|---|---|
ENV_WORKSPACE_DIR |
public | string | 'FAST_FORWARD_WORKSPACE_DIR' |
COVERAGE |
public | string | 'coverage' |
METRICS |
public | string | 'metrics' |
PHPDOC |
public | string | 'phpdoc' |
PHPUNIT |
public | string | 'phpunit' |
RECTOR |
public | string | 'rector' |
PHP_CS_FIXER |
public | string | 'php-cs-fixer' |
WORKSPACE_ROOT |
public | string | '.dev-tools' |
Returns a repository-local managed output directory.
public static getOutputDirectory(string $path = '', string $baseDir = ''): stringThe 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.
- This method is static. Parameters:
| Parameter | Type | Description |
|---|---|---|
$path |
string | the optional relative segment to append under the managed output root |
$baseDir |
string | the optional repository root used to resolve the managed workspace path |
Returns a repository-local managed cache directory.
public static getCacheDirectory(string $path = '', string $baseDir = ''): stringThe optional $path MUST be a relative cache segment, while $baseDir MAY
resolve the managed workspace root before the cache directory is
appended.
- This method is static. Parameters:
| Parameter | Type | Description |
|---|---|---|
$path |
string | the optional relative cache segment to append under the managed cache root |
$baseDir |
string | the optional repository root used to resolve the managed cache path |
Returns the configured workspace root.
public static getWorkspaceRoot(string $baseDir = ''): stringRelative workspace paths stay relative when no base directory is provided. When a base directory is provided, relative workspaces are materialized under that base directory while absolute workspaces are used as-is.
- This method is static. Parameters:
| Parameter | Type | Description |
|---|---|---|
$baseDir |
string | the optional repository root used to resolve a relative workspace |
Returns the workspace root as a project-relative directory when tooling should skip generated artifacts during source scans.
public static getProjectRelativeWorkspaceRoot(string $baseDir = ''): ?string- This method is static. Parameters:
| Parameter | Type | Description |
|---|---|---|
$baseDir |
string | the optional repository root used to relativize absolute workspace paths |