function Comparer::getChangedAsString
Return value
string empty string if no changes
File
-
vendor/
composer/ composer/ src/ Composer/ Package/ Comparer/ Comparer.php, line 64
Class
- Comparer
- class Comparer
Namespace
Composer\Package\ComparerCode
public function getChangedAsString(bool $toString = false, bool $explicated = false) : string {
$changed = $this->getChanged($explicated);
if (false === $changed) {
return '';
}
$strings = [];
foreach ($changed as $sectionKey => $itemSection) {
foreach ($itemSection as $itemKey => $item) {
$strings[] = $item . "\r\n";
}
}
return trim(implode("\r\n", $strings));
}