fix: PHPStan level 5 - fix metrics increment bug #127

Merged
jmiller merged 2 commits from dev into main 2026-05-26 03:43:43 +00:00
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -282,7 +282,7 @@ class BulkSync extends CliFramework
}
}
return array_values(array_merge($priority, $rest));
return array_merge($priority, $rest);
}
/**
+3 -3
View File
@@ -1508,16 +1508,16 @@ HCL;
if ($updated) {
$results['success']++;
$this->metrics->increment('repos_updated_total', ['status' => 'success']);
$this->metrics->increment('repos_updated_total', 1, ['status' => 'success']);
$results['repositories'][$repoName] = 'updated';
} else {
$results['skipped']++;
$this->metrics->increment('repos_updated_total', ['status' => 'skipped']);
$this->metrics->increment('repos_updated_total', 1, ['status' => 'skipped']);
$results['repositories'][$repoName] = 'skipped';
}
} catch (Exception $e) {
$results['failed']++;
$this->metrics->increment('repos_updated_total', ['status' => 'failed']);
$this->metrics->increment('repos_updated_total', 1, ['status' => 'failed']);
$results['repositories'][$repoName] = 'failed: ' . $e->getMessage();
}
+1 -1
View File
@@ -6,7 +6,7 @@
# PHPStan configuration for moko-platform projects
parameters:
level: 4
level: 5
paths:
- lib
- validate