mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Various code cleanup [skip ci]
This commit is contained in:
@@ -164,63 +164,4 @@ class JournalFormRequest extends Request
|
||||
{
|
||||
return $this->get($field) ?? '';
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * @param int $index
|
||||
// * @param string $field
|
||||
// *
|
||||
// * @return int
|
||||
// */
|
||||
// private function getIntFromArray(int $index, string $field): int
|
||||
// {
|
||||
// $array = $this->get($field);
|
||||
// if (isset($array[$index])) {
|
||||
// return intval($array[$index]);
|
||||
// }
|
||||
//
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * @param int $index
|
||||
// * @param string $field
|
||||
// *
|
||||
// * @return string
|
||||
// */
|
||||
// private function getStringFromArray(int $index, string $field): string
|
||||
// {
|
||||
// $array = $this->get($field);
|
||||
// if (isset($array[$index])) {
|
||||
// return trim($array[$index]);
|
||||
// }
|
||||
//
|
||||
// return '';
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * @return array
|
||||
// */
|
||||
// private function getTransactionData(): array
|
||||
// {
|
||||
// $transactions = [];
|
||||
// $array = $this->get('amount');
|
||||
// if (is_array($array) && count($array) > 0) {
|
||||
// foreach ($array as $index => $amount) {
|
||||
// $transaction = [
|
||||
// 'description' => $this->getStringFromArray($index, 'description'),
|
||||
// 'amount' => round($amount, 2),
|
||||
// 'budget_id' => $this->getIntFromArray($index, 'budget_id'),
|
||||
// 'category' => $this->getStringFromArray($index, 'category'),
|
||||
// 'source_account_id' => $this->getIntFromArray($index, 'source_account_id'),
|
||||
// 'source_account_name' => $this->getStringFromArray($index, 'source_account_name'),
|
||||
// 'destination_account_id' => $this->getIntFromArray($index, 'destination_account_id'),
|
||||
// 'destination_account_name' => $this->getStringFromArray($index, 'destination_account_name'),
|
||||
// 'piggy_bank_id' => $this->getIntFromArray($index, 'piggy_bank_id'),
|
||||
// ];
|
||||
// $transactions[] = $transaction;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return $transactions;
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user