function ShowCommand::appendLink
Parameters
JsonStructure $json:
Return value
JsonStructure
1 call to ShowCommand::appendLink()
- ShowCommand::appendLinks in vendor/
composer/ composer/ src/ Composer/ Command/ ShowCommand.php
File
-
vendor/
composer/ composer/ src/ Composer/ Command/ ShowCommand.php, line 1194
Class
- ShowCommand
- @author Robert Schönthal <seroscho@googlemail.com> @author Jordi Boggiano <j.boggiano@seld.be> @author Jérémy Romey <jeremyFreeAgent> @author Mihai Plasoianu <mihai@plasoianu.de>
Namespace
Composer\CommandCode
private function appendLink(array $json, CompletePackageInterface $package, string $linkType) : array {
$links = $package->{'get' . ucfirst($linkType)}();
if ($links) {
$json[$linkType] = [];
foreach ($links as $link) {
$json[$linkType][$link->getTarget()] = $link->getPrettyConstraint();
}
}
return $json;
}