if (!
is_int($options['contextLines'
]) ||
$options['contextLines'
] < 0
) { throw new ConfigurationException('contextLines', 'an int >= 0',
$options['contextLines'
]);
} if (!
is_int($options['commonLineThreshold'
]) ||
$options['commonLineThreshold'
] <= 0
) { throw new ConfigurationException('commonLineThreshold', 'an int > 0',
$options['commonLineThreshold'
]);
} $this->
assertString($options, 'fromFile'
);
$this->
assertString($options, 'toFile'
);
$this->
assertStringOrNull($options, 'fromFileDate'
);
$this->
assertStringOrNull($options, 'toFileDate'
);
$this->header =
sprintf( "--- %s%s\n+++ %s%s\n",
$options['fromFile'
],
null ===
$options['fromFileDate'
] ? '' : "\t" .
$options['fromFileDate'
],
$options['toFile'
],
null ===
$options['toFileDate'
] ? '' : "\t" .
$options['toFileDate'
] );
$this->collapseRanges =
$options['collapseRanges'
];