function ManifestDocumentMapper::mapCopyright
1 call to ManifestDocumentMapper::mapCopyright()
- ManifestDocumentMapper::map in vendor/
phar-io/ manifest/ src/ ManifestDocumentMapper.php
File
-
vendor/
phar-io/ manifest/ src/ ManifestDocumentMapper.php, line 56
Class
Namespace
PharIo\ManifestCode
private function mapCopyright(CopyrightElement $copyright) : CopyrightInformation {
$authors = new AuthorCollection();
foreach ($copyright->getAuthorElements() as $authorElement) {
$authors->add(new Author($authorElement->getName(), $authorElement->hasEMail() ? new Email($authorElement->getEmail()) : null));
}
$licenseElement = $copyright->getLicenseElement();
$license = new License($licenseElement->getType(), new Url($licenseElement->getUrl()));
return new CopyrightInformation($authors, $license);
}