mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 00:04:24 +00:00
Auto commit for release 'develop' on 2024-03-18
This commit is contained in:
@@ -43,7 +43,7 @@ class AccountForm
|
||||
/**
|
||||
* Grouped dropdown list of all accounts that are valid as the destination of a withdrawal.
|
||||
*/
|
||||
public function activeDepositDestinations(string $name, mixed $value = null, array $options = null): string
|
||||
public function activeDepositDestinations(string $name, mixed $value = null, ?array $options = null): string
|
||||
{
|
||||
$types = [AccountType::MORTGAGE, AccountType::DEBT, AccountType::CREDITCARD, AccountType::LOAN, AccountType::REVENUE];
|
||||
$repository = $this->getAccountRepository();
|
||||
@@ -55,7 +55,7 @@ class AccountForm
|
||||
return $this->select($name, $grouped, $value, $options);
|
||||
}
|
||||
|
||||
private function getAccountsGrouped(array $types, AccountRepositoryInterface $repository = null): array
|
||||
private function getAccountsGrouped(array $types, ?AccountRepositoryInterface $repository = null): array
|
||||
{
|
||||
if (null === $repository) {
|
||||
$repository = $this->getAccountRepository();
|
||||
@@ -89,7 +89,7 @@ class AccountForm
|
||||
/**
|
||||
* Grouped dropdown list of all accounts that are valid as the destination of a withdrawal.
|
||||
*/
|
||||
public function activeWithdrawalDestinations(string $name, mixed $value = null, array $options = null): string
|
||||
public function activeWithdrawalDestinations(string $name, mixed $value = null, ?array $options = null): string
|
||||
{
|
||||
$types = [AccountType::MORTGAGE, AccountType::DEBT, AccountType::CREDITCARD, AccountType::LOAN, AccountType::EXPENSE];
|
||||
$repository = $this->getAccountRepository();
|
||||
@@ -107,7 +107,7 @@ class AccountForm
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function assetAccountCheckList(string $name, array $options = null): string
|
||||
public function assetAccountCheckList(string $name, ?array $options = null): string
|
||||
{
|
||||
$options ??= [];
|
||||
$label = $this->label($name, $options);
|
||||
@@ -138,7 +138,7 @@ class AccountForm
|
||||
*
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function assetAccountList(string $name, $value = null, array $options = null): string
|
||||
public function assetAccountList(string $name, $value = null, ?array $options = null): string
|
||||
{
|
||||
$types = [AccountType::ASSET, AccountType::DEFAULT];
|
||||
$grouped = $this->getAccountsGrouped($types);
|
||||
@@ -151,7 +151,7 @@ class AccountForm
|
||||
*
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function longAccountList(string $name, $value = null, array $options = null): string
|
||||
public function longAccountList(string $name, $value = null, ?array $options = null): string
|
||||
{
|
||||
$types = [AccountType::ASSET, AccountType::DEFAULT, AccountType::MORTGAGE, AccountType::DEBT, AccountType::CREDITCARD, AccountType::LOAN];
|
||||
$grouped = $this->getAccountsGrouped($types);
|
||||
|
@@ -42,7 +42,7 @@ class CurrencyForm
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function amount(string $name, $value = null, array $options = null): string
|
||||
public function amount(string $name, $value = null, ?array $options = null): string
|
||||
{
|
||||
return $this->currencyField($name, 'amount', $value, $options);
|
||||
}
|
||||
@@ -50,7 +50,7 @@ class CurrencyForm
|
||||
/**
|
||||
* @throws FireflyException
|
||||
*/
|
||||
protected function currencyField(string $name, string $view, mixed $value = null, array $options = null): string
|
||||
protected function currencyField(string $name, string $view, mixed $value = null, ?array $options = null): string
|
||||
{
|
||||
$label = $this->label($name, $options);
|
||||
$options = $this->expandOptionArray($name, $label, $options);
|
||||
@@ -106,7 +106,7 @@ class CurrencyForm
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function balanceAll(string $name, $value = null, array $options = null): string
|
||||
public function balanceAll(string $name, $value = null, ?array $options = null): string
|
||||
{
|
||||
return $this->allCurrencyField($name, 'balance', $value, $options);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ class CurrencyForm
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
protected function allCurrencyField(string $name, string $view, $value = null, array $options = null): string
|
||||
protected function allCurrencyField(string $name, string $view, $value = null, ?array $options = null): string
|
||||
{
|
||||
$label = $this->label($name, $options);
|
||||
$options = $this->expandOptionArray($name, $label, $options);
|
||||
@@ -173,7 +173,7 @@ class CurrencyForm
|
||||
*
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function currencyList(string $name, $value = null, array $options = null): string
|
||||
public function currencyList(string $name, $value = null, ?array $options = null): string
|
||||
{
|
||||
/** @var CurrencyRepositoryInterface $currencyRepos */
|
||||
$currencyRepos = app(CurrencyRepositoryInterface::class);
|
||||
@@ -195,7 +195,7 @@ class CurrencyForm
|
||||
*
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function currencyListEmpty(string $name, $value = null, array $options = null): string
|
||||
public function currencyListEmpty(string $name, $value = null, ?array $options = null): string
|
||||
{
|
||||
/** @var CurrencyRepositoryInterface $currencyRepos */
|
||||
$currencyRepos = app(CurrencyRepositoryInterface::class);
|
||||
|
@@ -36,7 +36,7 @@ trait FormSupport
|
||||
/**
|
||||
* @param mixed $selected
|
||||
*/
|
||||
public function select(string $name, array $list = null, $selected = null, array $options = null): string
|
||||
public function select(string $name, ?array $list = null, $selected = null, ?array $options = null): string
|
||||
{
|
||||
$list ??= [];
|
||||
$label = $this->label($name, $options);
|
||||
@@ -55,7 +55,7 @@ trait FormSupport
|
||||
return $html;
|
||||
}
|
||||
|
||||
protected function label(string $name, array $options = null): string
|
||||
protected function label(string $name, ?array $options = null): string
|
||||
{
|
||||
$options ??= [];
|
||||
if (array_key_exists('label', $options)) {
|
||||
@@ -69,7 +69,7 @@ trait FormSupport
|
||||
/**
|
||||
* @param mixed $label
|
||||
*/
|
||||
protected function expandOptionArray(string $name, $label, array $options = null): array
|
||||
protected function expandOptionArray(string $name, $label, ?array $options = null): array
|
||||
{
|
||||
$options ??= [];
|
||||
$name = str_replace('[]', '', $name);
|
||||
|
@@ -40,7 +40,7 @@ class PiggyBankForm
|
||||
*
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function piggyBankList(string $name, $value = null, array $options = null): string
|
||||
public function piggyBankList(string $name, $value = null, ?array $options = null): string
|
||||
{
|
||||
// make repositories
|
||||
/** @var PiggyBankRepositoryInterface $repository */
|
||||
|
@@ -34,7 +34,7 @@ class RuleForm
|
||||
{
|
||||
use FormSupport;
|
||||
|
||||
public function ruleGroupList(string $name, mixed $value = null, array $options = null): string
|
||||
public function ruleGroupList(string $name, mixed $value = null, ?array $options = null): string
|
||||
{
|
||||
/** @var RuleGroupRepositoryInterface $groupRepos */
|
||||
$groupRepos = app(RuleGroupRepositoryInterface::class);
|
||||
@@ -54,7 +54,7 @@ class RuleForm
|
||||
/**
|
||||
* @param null $value
|
||||
*/
|
||||
public function ruleGroupListWithEmpty(string $name, $value = null, array $options = null): string
|
||||
public function ruleGroupListWithEmpty(string $name, $value = null, ?array $options = null): string
|
||||
{
|
||||
$options ??= [];
|
||||
$options['class'] = 'form-control';
|
||||
|
Reference in New Issue
Block a user