Skip to documentation

Merger

Class
implements MergerInterface
Read only: Yes Final: Yes

Merges ordered .gitignore rules with canonical defaults before consumer overrides.

Description

Existing patterns MUST retain their order, whitespace and repeated occurrences.

Table of Contents

Interfaces

MergerInterface

Defines the contract for merging .gitignore entries.

Properties

Methods

__construct()

Retains the classifier constructor parameter for compatibility with consumers.

 : mixed
merge()

Prepends canonical defaults once, allowing later consumer rules to override them.

 : GitIgnoreInterface
patterns()

Removes only blank lines and comments, never normalizing pattern whitespace.

 : array<int, string>
Properties
Methods

patterns()

Private

Removes only blank lines and comments, never normalizing pattern whitespace.

private patterns( array<int, string>  $entries) : array<int, string>
Parameters
$entries : array<int, string>

Description

the raw rules

Return values
array<int, string>
Search results