Skip to content

ProjectCapabilities

github-actions[bot] edited this page May 1, 2026 · 1 revision

Captures which documentation, testing, and wiki surfaces are available for the current repository.


  • Full name: \FastForward\DevTools\Project\ProjectCapabilities
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

__construct

Creates a repository capability snapshot for reporting and documentation commands.

public __construct(list<string> $apiDirectories, string|null $defaultPackageName, bool $hasGuideDirectory, bool $hasTestsPath, bool $hasWikiTarget, bool $hasPhpSourceFiles): mixed

Parameters:

Parameter Type Description
$apiDirectories list project-relative directories that contain autoloaded PHP API source
$defaultPackageName string|null the default package name derived from Composer namespaces when available
$hasGuideDirectory bool whether the configured guide directory exists
$hasTestsPath bool whether the configured tests path exists
$hasWikiTarget bool whether the configured wiki target exists
$hasPhpSourceFiles bool whether the repository exposes autoloaded PHP source that can be tested

getApiDirectories

Returns the project-relative directories that expose autoloaded PHP API source.

public getApiDirectories(): array

getDefaultPackageName

Returns the default API package name when one can be derived from Composer namespaces.

public getDefaultPackageName(): ?string

hasGuideDirectory

Detects whether the configured guide directory exists.

public hasGuideDirectory(): bool

hasTestsPath

Detects whether the configured tests directory exists.

public hasTestsPath(): bool

hasWikiTarget

Detects whether the configured wiki target exists.

public hasWikiTarget(): bool

hasPhpSourceFiles

Detects whether the repository exposes autoloaded PHP source that can be tested.

public hasPhpSourceFiles(): bool

canGenerateApiDocumentation

Detects whether the repository exposes autoloaded PHP API source.

public canGenerateApiDocumentation(): bool

canGenerateDocs

Detects whether the repository can generate guides, API documentation, or both.

public canGenerateDocs(): bool

canGenerateMetrics

Detects whether metrics generation can analyse repository history and package metadata.

public canGenerateMetrics(): bool

canGenerateWiki

Detects whether wiki generation can render API documentation into the configured wiki target.

public canGenerateWiki(): bool

canRunTests

Detects whether the repository has enough PHP surface to justify running tests.

public canRunTests(): bool

Clone this wiki locally