-
-
Notifications
You must be signed in to change notification settings - Fork 0
Writer
github-actions edited this page Apr 19, 2026
·
1 revision
Persists normalized .gitattributes content.
This writer SHALL align attribute declarations using the longest path spec, write the provided textual content to the target path, and MUST append a final trailing line feed for deterministic formatting.
- Full name:
\FastForward\DevTools\GitAttributes\Writer - This class is marked as final and can't be subclassed
- This class implements:
\FastForward\DevTools\GitAttributes\WriterInterface - This class is a Final class
public __construct(\FastForward\DevTools\Filesystem\FilesystemInterface $filesystem): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$filesystem |
\FastForward\DevTools\Filesystem\FilesystemInterface | the filesystem service responsible for writing the file |
Writes the .gitattributes content to the specified filesystem path.
public write(string $gitattributesPath, string $content): voidParameters:
| Parameter | Type | Description |
|---|---|---|
$gitattributesPath |
string | The filesystem path to the .gitattributes file. |
$content |
string | The merged .gitattributes content to persist. |
Renders normalized .gitattributes content.
public render(string $content): stringParameters:
| Parameter | Type | Description |
|---|---|---|
$content |
string | the merged .gitattributes content to normalize |
Return Value:
the normalized file content