WriterInterface

Interface

Defines the contract for writing .gitattributes files to persistent storage.

Description

Implementations MUST write the provided content to the target path, SHOULD normalize attribute-column alignment for deterministic output, and SHALL ensure the resulting file ends with a trailing line feed.

Table of Contents

Methods

render()

Renders normalized .gitattributes content without persisting it.

 : string
write()

Writes the .gitattributes content to the specified filesystem path.

 : void
Methods

render()

Public

Renders normalized .gitattributes content without persisting it.

public render( string  $content) : string
Parameters
$content : string

Description

the merged .gitattributes content to normalize

Return values
string

Description

the normalized file content

write()

Public

Writes the .gitattributes content to the specified filesystem path.

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

Description

The filesystem path to the .gitattributes file.

$content : string

Description

The merged .gitattributes content to persist.