fix(Console): add void as valid return type for command methods
The MethodSignatureAnalyzer was rejecting command methods with void return type, causing the schedule:run command to fail validation.
This commit is contained in:
@@ -5,8 +5,8 @@ declare(strict_types=1);
|
||||
namespace App\Framework\ExceptionHandling\Audit;
|
||||
|
||||
use App\Framework\Audit\AuditLogger;
|
||||
use App\Framework\Audit\ValueObjects\AuditEntry;
|
||||
use App\Framework\Audit\ValueObjects\AuditableAction;
|
||||
use App\Framework\Audit\ValueObjects\AuditEntry;
|
||||
use App\Framework\DateTime\Clock;
|
||||
use App\Framework\ExceptionHandling\Context\ExceptionContextData;
|
||||
use App\Framework\ExceptionHandling\Context\ExceptionContextProvider;
|
||||
@@ -44,7 +44,7 @@ final readonly class ExceptionAuditLogger
|
||||
$context = $context ?? $this->getContext($exception);
|
||||
|
||||
// Skip if not auditable
|
||||
if (!$this->isAuditable($context)) {
|
||||
if (! $this->isAuditable($context)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -192,6 +192,7 @@ final readonly class ExceptionAuditLogger
|
||||
// Remove common suffixes
|
||||
$component = $context->component;
|
||||
$component = preg_replace('/Service$|Repository$|Manager$|Handler$/', '', $component);
|
||||
|
||||
return strtolower($component);
|
||||
}
|
||||
|
||||
@@ -246,7 +247,7 @@ final readonly class ExceptionAuditLogger
|
||||
];
|
||||
|
||||
// Add context data
|
||||
if (!empty($context->data)) {
|
||||
if (! empty($context->data)) {
|
||||
$metadata['context_data'] = $context->data;
|
||||
}
|
||||
|
||||
@@ -267,7 +268,7 @@ final readonly class ExceptionAuditLogger
|
||||
}
|
||||
|
||||
// Add tags
|
||||
if (!empty($context->tags)) {
|
||||
if (! empty($context->tags)) {
|
||||
$metadata['tags'] = $context->tags;
|
||||
}
|
||||
|
||||
@@ -283,7 +284,7 @@ final readonly class ExceptionAuditLogger
|
||||
// Merge with existing metadata (but exclude internal fields)
|
||||
$excludeKeys = ['auditable', 'audit_action', 'entity_type'];
|
||||
foreach ($context->metadata as $key => $value) {
|
||||
if (!in_array($key, $excludeKeys, true)) {
|
||||
if (! in_array($key, $excludeKeys, true)) {
|
||||
$metadata[$key] = $value;
|
||||
}
|
||||
}
|
||||
@@ -306,4 +307,3 @@ final readonly class ExceptionAuditLogger
|
||||
return $this->contextProvider->get($exception);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user