mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Clean up balance chart.
This commit is contained in:
@@ -57,14 +57,11 @@ class ChartData
|
||||
if (array_key_exists('native_currency_id', $data)) {
|
||||
$data['native_currency_id'] = (string) $data['native_currency_id'];
|
||||
}
|
||||
if (!array_key_exists('start', $data)) {
|
||||
throw new FireflyException('Data-set is missing the "start"-variable.');
|
||||
}
|
||||
if (!array_key_exists('end', $data)) {
|
||||
throw new FireflyException('Data-set is missing the "end"-variable.');
|
||||
}
|
||||
if (!array_key_exists('period', $data)) {
|
||||
throw new FireflyException('Data-set is missing the "period"-variable.');
|
||||
$required = ['start', 'date', 'end', 'entries', 'native_entries'];
|
||||
foreach ($required as $field) {
|
||||
if (!array_key_exists($field, $data)) {
|
||||
throw new FireflyException(sprintf('Data-set is missing the "%s"-variable.', $field));
|
||||
}
|
||||
}
|
||||
|
||||
$this->series[] = $data;
|
||||
|
Reference in New Issue
Block a user