Skip to content
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.


Methods

__construct

public __construct(\FastForward\DevTools\Filesystem\FilesystemInterface $filesystem): mixed

Parameters:

Parameter Type Description
$filesystem \FastForward\DevTools\Filesystem\FilesystemInterface the filesystem service responsible for writing the file

write

Writes the .gitattributes content to the specified filesystem path.

public write(string $gitattributesPath, string $content): void

Parameters:

Parameter Type Description
$gitattributesPath string The filesystem path to the .gitattributes file.
$content string The merged .gitattributes content to persist.

render

Renders normalized .gitattributes content.

public render(string $content): string

Parameters:

Parameter Type Description
$content string the merged .gitattributes content to normalize

Return Value:

the normalized file content


Clone this wiki locally