Skip to content

Commit

Permalink
Change method and property names for ignored uplifts + spacing nits
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalchevrel committed Mar 15, 2023
1 parent cc2c350 commit d90055c
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions src/pchevrel/BzKarma/Scoring.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down Expand Up @@ -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
*/
Expand All @@ -204,7 +204,6 @@ public function getBugScoreDetails(int $bugNumber): array
}
}


return [
/*
Severity and Priority fields had other values in the past like normal, trivial…
Expand Down Expand Up @@ -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,
];
}
}

0 comments on commit d90055c

Please sign in to comment.