Skip to content

Commit

Permalink
dca()->getDcaFields() move constructor call to method body
Browse files Browse the repository at this point in the history
  • Loading branch information
ericges committed Mar 19, 2024
1 parent dcb2ac6 commit b0ce235
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Util/DcaUtil.php
Expand Up @@ -136,8 +136,12 @@ function ($a) use (&$arrFields) {
* Return a list of dca fields for given table.
* Fields can be filtered by given options.
*/
public function getDcaFields(string $table, GetDcaFieldsOptions $options = new GetDcaFieldsOptions()): array
public function getDcaFields(string $table, ?GetDcaFieldsOptions $options = null): array
{
if (null === $options) {
$options = new GetDcaFieldsOptions();
}

$fields = [];

$controller = $this->contaoFramework->getAdapter(Controller::class);
Expand Down

0 comments on commit b0ce235

Please sign in to comment.