From c997d79be9b41c261dbcb9b143c3f80dfe499b2c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 30 Oct 2023 20:37:40 +0100 Subject: [PATCH] refactoring --- lam/templates/tools/importexport.php | 14 +++++++------- lam/templates/tools/webauthn.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lam/templates/tools/importexport.php b/lam/templates/tools/importexport.php index 6de0a2af9..94ba5eefb 100644 --- a/lam/templates/tools/importexport.php +++ b/lam/templates/tools/importexport.php @@ -147,14 +147,14 @@ function printImportTabContent(): void { $sourceRadio = new htmlResponsiveRadio(_('Source'), 'source', $sources, 'text'); $sourceRadio->setTableRowsToHide( [ - 'file' => array('text'), - 'text' => array('file') + 'file' => ['text'], + 'text' => ['file'] ] ); $sourceRadio->setTableRowsToShow( [ - 'text' => array('text'), - 'file' => array('file') + 'text' => ['text'], + 'file' => ['file'] ] ); $container->add($sourceRadio, 12); @@ -272,7 +272,7 @@ function printExportTabContent(): void { _('One (one level beneath base)') => 'one', _('Sub (entire subtree)') => 'sub' ]; - $searchScopeSelect = new htmlResponsiveSelect('searchScope', $searchScopes, array('sub'), _('Search scope')); + $searchScopeSelect = new htmlResponsiveSelect('searchScope', $searchScopes, ['sub'], _('Search scope')); $searchScopeSelect->setHasDescriptiveElements(true); $searchScopeSelect->setSortElements(false); $container->add($searchScopeSelect, 12); @@ -285,7 +285,7 @@ function printExportTabContent(): void { 'CSV' => 'csv', 'LDIF' => 'ldif' ]; - $formatSelect = new htmlResponsiveSelect('format', $formats, array('ldif'), _('Export format')); + $formatSelect = new htmlResponsiveSelect('format', $formats, ['ldif'], _('Export format')); $formatSelect->setHasDescriptiveElements(true); $formatSelect->setSortElements(false); $container->add($formatSelect, 12); @@ -294,7 +294,7 @@ function printExportTabContent(): void { 'Windows' => 'windows', 'Unix' => 'unix' ]; - $endingsSelect = new htmlResponsiveSelect('ending', $endings, array('unix'), _('End of line')); + $endingsSelect = new htmlResponsiveSelect('ending', $endings, ['unix'], _('End of line')); $endingsSelect->setHasDescriptiveElements(true); $endingsSelect->setSortElements(false); $container->add($endingsSelect, 12); diff --git a/lam/templates/tools/webauthn.php b/lam/templates/tools/webauthn.php index 1a3f5f6dd..12cb73cd9 100644 --- a/lam/templates/tools/webauthn.php +++ b/lam/templates/tools/webauthn.php @@ -104,7 +104,7 @@ else { _('Last use'), _('Delete') ]; - $data = array(); + $data = []; $id = 0; foreach ($results as $result) { $credentialId = $result['credentialId'];