From d90055ce3b62986758fe0f9106619dc525cdadf7 Mon Sep 17 00:00:00 2001 From: Pascal Chevrel Date: Wed, 15 Mar 2023 18:47:16 +0100 Subject: [PATCH] Change method and property names for ignored uplifts + spacing nits --- src/pchevrel/BzKarma/Scoring.php | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/pchevrel/BzKarma/Scoring.php b/src/pchevrel/BzKarma/Scoring.php index e82cf30..743e60e 100644 --- a/src/pchevrel/BzKarma/Scoring.php +++ b/src/pchevrel/BzKarma/Scoring.php @@ -123,7 +123,7 @@ class Scoring The library returns a value of 0 for bugs already uplifted, We may want to bypass this setting to look at bugs in past trains */ - private bool $nightlyScoreOnly = false; + private bool $ignoreUpliftStatus = false; /* We work from a dataset provided by the Bugzilla rest API @@ -140,7 +140,7 @@ public function __construct(array $bugsDetails, int $release) Pass true to this method before calling getScore() to get the value of an already uplifted bug */ - public function scoreNightlyOnly(bool $status): void + public function ignoreUplifts(bool $status): void { $this->nightlyScoreOnly = $status; } @@ -181,7 +181,7 @@ public function getBugScoreDetails(int $bugNumber): array return $this->zeroBugScore(); } - if ($this->nightlyScoreOnly === false) { + if ($this->ignoreUpliftStatus === false) { /* Bug already uplifted, uplift value is 0 */ @@ -204,7 +204,6 @@ public function getBugScoreDetails(int $bugNumber): array } } - return [ /* Severity and Priority fields had other values in the past like normal, trivial… @@ -244,18 +243,18 @@ private function getFieldValue(int $bugNumber, string $bz_field, string $local_f private function zeroBugScore(): array { return [ - 'type' => 0, - 'priority' => 0, - 'severity' => 0, - 'keywords' => 0, - 'duplicates' => 0, - 'regressions' => 0, - 'webcompat' => 0, - 'perf_impact' => 0, - 'cc' => 0, - 'tracking_firefox' . $this->nightly => 0, - 'tracking_firefox' . $this->beta => 0, - 'tracking_firefox' . $this->release => 0, + 'type' => 0, + 'priority' => 0, + 'severity' => 0, + 'keywords' => 0, + 'duplicates' => 0, + 'regressions' => 0, + 'webcompat' => 0, + 'perf_impact' => 0, + 'cc' => 0, + 'tracking_firefox' . $this->nightly => 0, + 'tracking_firefox' . $this->beta => 0, + 'tracking_firefox' . $this->release => 0, ]; } } \ No newline at end of file