function MultiConflictRule::__toString
Formats a rule as a string of the format (Literal1|Literal2|...)
Overrides Rule::__toString
File
-
vendor/
composer/ composer/ src/ Composer/ DependencyResolver/ MultiConflictRule.php, line 97
Class
- MultiConflictRule
- @author Nils Adermann <naderman@naderman.de>
Namespace
Composer\DependencyResolverCode
public function __toString() : string {
// TODO multi conflict?
$result = $this->isDisabled() ? 'disabled(multi(' : '(multi(';
foreach ($this->literals as $i => $literal) {
if ($i !== 0) {
$result .= '|';
}
$result .= $literal;
}
$result .= '))';
return $result;
}