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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user