fix: env vars handled via conf file, add: functional tests

This commit is contained in:
Michael 2024-08-17 18:06:06 +02:00
parent 3d08b14f11
commit 21c4330f16
39 changed files with 416 additions and 172 deletions

View file

@ -7,9 +7,9 @@ class CsvSumTotalsCalc
private $calculate_agent_cost;
public function __construct()
public function __construct($calculate_agent_cost = false)
{
$this->calculate_agent_cost = env('GITEA_CALCULATE_AGENT_COST');
$this->calculate_agent_cost = $calculate_agent_cost || config('app.gitea_calculate_agent_cost');
}
private function sum_total_cost(array $array)