mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Improve test coverage.
This commit is contained in:
@@ -30,23 +30,6 @@ namespace FireflyIII\Support\Http\Controllers;
|
||||
trait BasicDataSupport
|
||||
{
|
||||
|
||||
/**
|
||||
* Sum up an array.
|
||||
*
|
||||
* @param array $array
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function arraySum(array $array): string // filter + group data
|
||||
{
|
||||
$sum = '0';
|
||||
foreach ($array as $entry) {
|
||||
$sum = bcadd($sum, $entry);
|
||||
}
|
||||
|
||||
return $sum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters empty results from getBudgetPeriodReport.
|
||||
*
|
||||
|
||||
@@ -236,6 +236,7 @@ trait ChartGeneration
|
||||
$chartData[1]['entries'][$label] = round($earned, 12);
|
||||
$chartData[2]['entries'][$label] = round($sum, 12);
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
switch ($step) {
|
||||
default:
|
||||
case '1D':
|
||||
@@ -251,6 +252,7 @@ trait ChartGeneration
|
||||
$start->addYear();
|
||||
break;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
$data = $generator->multiSet($chartData);
|
||||
|
||||
@@ -155,8 +155,7 @@ trait UserNavigation
|
||||
$url = app('url')->previous();
|
||||
session()->put($identifier, $url);
|
||||
//Log::debug(sprintf('Will put previous URI in cache under key %s: %s', $identifier, $url));
|
||||
|
||||
return;
|
||||
//return;
|
||||
}
|
||||
//Log::debug(sprintf('The users session contains errors somehow so we will not remember the URI!: %s', var_export($errors, true)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user