mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
Better code.
This commit is contained in:
@@ -60,10 +60,7 @@ class AutocompleteRequest extends FormRequest
|
||||
$limit = 0 === $limit ? 10 : $limit;
|
||||
|
||||
// remove 'initial balance' from allowed types. its internal
|
||||
if (($key = array_search(AccountType::INITIAL_BALANCE, $array)) !== false) {
|
||||
unset($types[$key]);
|
||||
$array = array_values($array);
|
||||
}
|
||||
$array = array_diff($array, [AccountType::INITIAL_BALANCE]);
|
||||
|
||||
return [
|
||||
'types' => $array,
|
||||
|
Reference in New Issue
Block a user