|
| 1 | +<?php declare(strict_types=1); |
| 2 | + |
| 3 | +/* |
| 4 | + * This file is part of Packagist. |
| 5 | + * |
| 6 | + * (c) Jordi Boggiano <j.boggiano@seld.be> |
| 7 | + * Nils Adermann <naderman@naderman.de> |
| 8 | + * |
| 9 | + * For the full copyright and license information, please view the LICENSE |
| 10 | + * file that was distributed with this source code. |
| 11 | + */ |
| 12 | + |
| 13 | +namespace App\Audit\Display; |
| 14 | + |
| 15 | +use App\Audit\AuditRecordType; |
| 16 | + |
| 17 | +readonly class PackageTransferredDisplay extends AbstractAuditLogDisplay |
| 18 | +{ |
| 19 | + /** |
| 20 | + * @param array<ActorDisplay> $previousMaintainers |
| 21 | + * @param array<ActorDisplay> $currentMaintainers |
| 22 | + */ |
| 23 | + public function __construct( |
| 24 | + \DateTimeImmutable $datetime, |
| 25 | + public string $packageName, |
| 26 | + /** @var array<string> $previousMaintainers */ |
| 27 | + public array $previousMaintainers, |
| 28 | + /** @var array<string> $currentMaintainers */ |
| 29 | + public array $currentMaintainers, |
| 30 | + ActorDisplay $actor, |
| 31 | + ) { |
| 32 | + parent::__construct($datetime, $actor); |
| 33 | + } |
| 34 | + |
| 35 | + public function getType(): AuditRecordType |
| 36 | + { |
| 37 | + return AuditRecordType::PackageTransferred; |
| 38 | + } |
| 39 | + |
| 40 | + public function getTemplateName(): string |
| 41 | + { |
| 42 | + return 'audit_log/display/package_transferred.html.twig'; |
| 43 | + } |
| 44 | +} |
0 commit comments