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