More complete rework of packet parsing and packet generation with f279d85 - and testing passes

This commit is contained in:
2024-05-20 21:31:21 +10:00
parent b30ab2f999
commit ab2e288f06
14 changed files with 227 additions and 210 deletions

View File

@@ -69,7 +69,7 @@ class PacketInfo extends Command
try {
$this->warn(sprintf('- Date : %s (%s)',$msg->datetime,$msg->datetime->tz->toOffsetName()));
$this->warn(sprintf(' - Errors : %s',$msg->errors?->errors()->count() ? 'YES' : 'No'));
$this->warn(sprintf(' - Errors : %s',$msg->errors->count() ? 'YES' : 'No'));
$this->warn(sprintf(' - Flags : %s',$msg->flags()->keys()->join(', ')));
$this->warn(sprintf(' - Cost : %d',$msg->cost));
$this->warn(sprintf(' - From : %s (%s)',$msg->from,$msg->fftn->ftn));
@@ -81,10 +81,10 @@ class PacketInfo extends Command
if ($msg instanceof Echomail)
$this->warn(sprintf(' - Area : %s',$msg->echoarea->name));
if ($msg->errors) {
if ($msg->errors->count()) {
echo "\n";
$this->error("Errors:");
foreach ($msg->errors->errors()->all() as $error)
foreach ($msg->errors->all() as $error)
$this->error(' - '.$error);
}
@@ -103,7 +103,7 @@ class PacketInfo extends Command
$this->error(sprintf(' - To: %s (%s)',$msg->to,$msg->tftn));
$this->error(sprintf(' - Subject: %s',$msg->subject));
foreach ($msg->errors->errors()->all() as $error)
foreach ($msg->errors->all() as $error)
$this->line(' - '.$error);
}