ProjectCapabilities

Class
Read only: Yes Final: Yes

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

Table of Contents

Properties

 : array<string|int, mixed>
 : string|null

Methods

__construct()

Creates a repository capability snapshot for reporting and documentation commands.

 : mixed
canGenerateApiDocumentation()

Detects whether the repository exposes autoloaded PHP API source.

 : bool
canGenerateDocs()

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

 : bool
canGenerateMetrics()

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

 : bool
canGenerateWiki()

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

 : bool
canRunTests()

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

 : bool
getApiDirectories()

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

 : array<string|int, mixed>
getDefaultPackageName()

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

 : string|null
hasGuideDirectory()

Detects whether the configured guide directory exists.

 : bool
hasPhpSourceFiles()

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

 : bool
hasTestsPath()

Detects whether the configured tests directory exists.

 : bool
hasWikiTarget()

Detects whether the configured wiki target exists.

 : bool
Properties
Methods

__construct()

Public

Creates a repository capability snapshot for reporting and documentation commands.

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

Description

project-relative directories that contain autoloaded PHP API source

$defaultPackageName : string|null

Description

the default package name derived from Composer namespaces when available

$hasGuideDirectory : bool

Description

whether the configured guide directory exists

$hasTestsPath : bool

Description

whether the configured tests path exists

$hasWikiTarget : bool

Description

whether the configured wiki target exists

$hasPhpSourceFiles : bool

Description

whether the repository exposes autoloaded PHP source that can be tested

canGenerateApiDocumentation()

Public

Detects whether the repository exposes autoloaded PHP API source.

public canGenerateApiDocumentation() : bool
Return values
bool

canGenerateDocs()

Public

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

public canGenerateDocs() : bool
Return values
bool

canGenerateMetrics()

Public

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

public canGenerateMetrics() : bool
Return values
bool

canGenerateWiki()

Public

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

public canGenerateWiki() : bool
Return values
bool

canRunTests()

Public

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

public canRunTests() : bool
Return values
bool

getApiDirectories()

Public

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

public getApiDirectories() : array<string|int, mixed>
Return values
array<string|int, mixed>

getDefaultPackageName()

Public

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

public getDefaultPackageName() : string|null
Return values
string|null

hasGuideDirectory()

Public

Detects whether the configured guide directory exists.

public hasGuideDirectory() : bool
Return values
bool

hasPhpSourceFiles()

Public

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

public hasPhpSourceFiles() : bool
Return values
bool

hasTestsPath()

Public

Detects whether the configured tests directory exists.

public hasTestsPath() : bool
Return values
bool

hasWikiTarget()

Public

Detects whether the configured wiki target exists.

public hasWikiTarget() : bool
Return values
bool