Skip to content
PHP Ecosystem
Explore

TextMergeStrategy

API reference › Scaffold › Merge › TextMergeStrategy

final classPHPForge\Scaffold\Merge\TextMergeStrategy
ExtendsAbstractLineMergeStrategy
ImplementsMergeStrategy
Sourcesrc/Merge/TextMergeStrategy.php

Merges plain text by appending the non-blank provider lines the consumer lacks, compared after right-trim.

MethodDescriptionDefined by
merge()Adds the provider entries missing from the consumer.AbstractLineMergeStrategy
plan() protectedPlans one block, appended at the end, with the missing provider lines in provider order.TextMergeStrategy
protected function plan(list<string> $provider, list<string> $consumer): PHPForge\Scaffold\Merge\MergePlan

Plans one block, appended at the end, with the missing provider lines in provider order.

Parameters

ParameterTypeDescription
$providerlist<string>Provider lines.
$consumerlist<string>Consumer lines without terminators.

Returns

PHPForge\Scaffold\Merge\MergePlan: No insertions, and one block of missing lines, or no block when the consumer has them all.