Skip to content

Resolver

github-actions edited this page Apr 10, 2026 · 2 revisions

Resolves license identifiers to their corresponding template filenames.

This class maintains a mapping of supported open-source licenses to their template files and provides methods to check support and resolve licenses.


Methods

isSupported

Checks whether the given license identifier is supported.

public isSupported(string $license): bool

The check is case-insensitive and handles common license variants.

Parameters:

Parameter Type Description
$license string The license identifier to check

Return Value:

True if the license is supported, false otherwise


resolve

Resolves a license identifier to its template filename.

public resolve(string $license): string|null

Parameters:

Parameter Type Description
$license string The license identifier to resolve

Return Value:

The template filename if supported, or null if not


Clone this wiki locally