-
-
Notifications
You must be signed in to change notification settings - Fork 0
GeneratorInterface
github-actions edited this page Apr 10, 2026
·
2 revisions
Generates LICENSE files from composer.json metadata.
This interface defines the contract for generating license files by reading composer.json and producing appropriate license content.
- Full name:
\FastForward\DevTools\License\GeneratorInterface
Generates a LICENSE file at the specified path.
public generate(string $targetPath): string|nullReads the license from composer.json, validates it's supported, loads the appropriate template, resolves placeholders, and writes the LICENSE file to the target path.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$targetPath |
string | The full path where the LICENSE file should be written |
Return Value:
The generated license content, or null if generation failed
Checks whether a supported license is present in composer.json.
public hasLicense(): boolReturn Value:
True if a supported license is defined, false otherwise