fix(Console): add void as valid return type for command methods
All checks were successful
Test Runner / test-php (push) Successful in 31s
Deploy Application / deploy (push) Successful in 1m42s
Test Runner / test-basic (push) Successful in 7s

The MethodSignatureAnalyzer was rejecting command methods with void return
type, causing the schedule:run command to fail validation.
This commit is contained in:
2025-11-26 06:16:09 +01:00
parent 386baff65f
commit c93d3f07a2
73 changed files with 1674 additions and 163 deletions

View File

@@ -100,6 +100,7 @@ final readonly class ExceptionMetricsCollector
private function getMetric(string $metricName): int
{
$cacheKey = CacheKey::fromString(self::CACHE_PREFIX . $metricName);
return $this->getMetricValue($cacheKey);
}
@@ -111,11 +112,12 @@ final readonly class ExceptionMetricsCollector
$result = $this->cache->get($cacheKey);
$item = $result->getItem($cacheKey);
if (!$item->isHit) {
if (! $item->isHit) {
return 0;
}
$value = $item->value;
return is_int($value) ? $value : 0;
}
@@ -163,7 +165,7 @@ final readonly class ExceptionMetricsCollector
$result = $this->cache->get($cacheKey);
$item = $result->getItem($cacheKey);
if (!$item->isHit || !is_array($item->value)) {
if (! $item->isHit || ! is_array($item->value)) {
return 0.0;
}
@@ -175,4 +177,3 @@ final readonly class ExceptionMetricsCollector
return array_sum($times) / count($times);
}
}