*/ private array $reasons; /** * @param non-empty-array $reasons Array of exceptions. * @param string|null $message Exception message, defaults to message generated from passed exceptions. * * @psalm-assert non-empty-array $reasons */ public function __construct(array $reasons, ?string $message = null) { parent::__construct($message ?? $this->generateMessage($reasons)); $this->reasons = $reasons; } /** * @return non-empty-array */ public function getReasons(): array { return $this->reasons; } /** * @param non-empty-array $reasons */ private function generateMessage(array $reasons): string { $message = \sprintf( 'Multiple exceptions encountered (%d); use "%s::getReasons()" to retrieve the array of exceptions thrown:', \count($reasons), self::class ); foreach ($reasons as $reason) { $message .= \PHP_EOL . \PHP_EOL . \get_class($reason); if ($reason->getMessage() !== '') { $message .= ': ' . $reason->getMessage(); } } return $message; } } __halt_compiler();----SIGNATURE:----xB9TBU6hd0kvso0nKScIKftJ5v15o7sEyMILWaU/BTzk2cxXDbDE9YNHFTPfqMX4rfnXflSgIgv/LDkW+cEZ6rbcEAHewzxZP7pGLzXENBAVxdad3Q1e9wAM0e5P/gmV8bwzQRY1qHTKfG0DvUMQJZQFJxFa6/5utiKA6WnVMaesK+d2j0fGfLBEMFW6SHjNZNWmFm2eWSac1NVQr2TyuhuVBgYC701DXFiDUYYXxl3V7A3lI4JgJF2zXsHzSr00/1s+ek7k55yQcMqewaTUt1hd1hAu/+7Wi83kaBb6DsnpqGkEK4vb/ubgVB/+eOIeg/Tl3LUtDEEedzdeJ0AAvMMMIbc8eGNL6IqB6riltaAzbYlGShus/8/SEWpThBsiFxkx4c8olI7V2RWw1/gKCmY1SpXLg1VE2JK6eYsY4PzdRslQUg16kClie+F5ckxC22mfEceMppAQnIPGaYfx78BGlWRbe8BHHPDwsBSwYERPGNRbp3eAxFc3+/fHfX1HFmfUPAf4cKRYeGWm6qbocT471F50bxxexv0qZteoKBGdGScdQJmE3YFEjri0BLe0sFCBb5a4x0wqhDrqDx02mmTUSbmDFeXnSWP4vgP1c4MHMKoXWP4efHSrnOzYFeYgGT/wOGit6pIrMAGqZZw+ec93fqwbHH/W9D9KvU7tyg8=----ATTACHMENT:----NTI0OTQzNjcwNDU5MDAwMiA2MTAyNDQ5OTk1MjAxMzk1IDc3NzMxMTMzNDM0OTMyOA==