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

@@ -49,7 +49,7 @@ class ExpandedForm
*/
public function amountNoCurrency(string $name, $value = null, array $options = null): string
{
$options ??= [];
$options ??= [];
$label = $this->label($name, $options);
$options = $this->expandOptionArray($name, $label, $options);
$classes = $this->getHolderClasses($name);
@@ -83,8 +83,8 @@ class ExpandedForm
*/
public function checkbox(string $name, int $value = null, $checked = null, array $options = null): string
{
$options ??= [];
$value ??= 1;
$options ??= [];
$value ??= 1;
$options['checked'] = true === $checked;
if (app('session')->has('preFilled')) {
@@ -169,7 +169,7 @@ class ExpandedForm
*/
public function integer(string $name, $value = null, array $options = null): string
{
$options ??= [];
$options ??= [];
$label = $this->label($name, $options);
$options = $this->expandOptionArray($name, $label, $options);
$classes = $this->getHolderClasses($name);
@@ -226,7 +226,7 @@ class ExpandedForm
/** @var Eloquent $entry */
foreach ($set as $entry) {
// All Eloquent models have an ID
$entryId = $entry->id; /** @phpstan-ignore-line */
$entryId = $entry->id; // @phpstan-ignore-line
$current = $entry->toArray();
$title = null;
foreach ($fields as $field) {