Clean up code.

This commit is contained in:
James Cole
2023-12-10 06:51:59 +01:00
parent c2b22a2bac
commit 46e130fdfe
195 changed files with 973 additions and 984 deletions

View File

@@ -132,7 +132,7 @@ class AccountForm
*/
public function assetAccountCheckList(string $name, array $options = null): string
{
$options ??= [];
$options ??= [];
$label = $this->label($name, $options);
$options = $this->expandOptionArray($name, $label, $options);
$classes = $this->getHolderClasses($name);

View File

@@ -44,7 +44,7 @@ trait FormSupport
*/
public function select(string $name, array $list = null, $selected = null, array $options = null): string
{
$list ??= [];
$list ??= [];
$label = $this->label($name, $options);
$options = $this->expandOptionArray($name, $label, $options);
$classes = $this->getHolderClasses($name);
@@ -86,7 +86,7 @@ trait FormSupport
*/
protected function expandOptionArray(string $name, $label, array $options = null): array
{
$options ??= [];
$options ??= [];
$name = str_replace('[]', '', $name);
$options['class'] = 'form-control';
$options['id'] = 'ffInput_' . $name;

View File

@@ -71,7 +71,7 @@ class PiggyBankForm
$groupTitle = $group->title;
$groupOrder = $group->order;
}
$subList[$groupOrder] ??= [
$subList[$groupOrder] ??= [
'group' => [
'title' => $groupTitle,
],

View File

@@ -67,7 +67,7 @@ class RuleForm
*/
public function ruleGroupListWithEmpty(string $name, $value = null, array $options = null): string
{
$options ??= [];
$options ??= [];
$options['class'] = 'form-control';
/** @var RuleGroupRepositoryInterface $groupRepos */
$groupRepos = app(RuleGroupRepositoryInterface::class);