From 77d531b2f461aa9472b852a986b24c4beb7711b1 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Tue, 3 May 2022 14:31:02 +0200 Subject: [PATCH] ApplicationConfigForm: Remove loop and simplify the code --- application/forms/Config/General/ApplicationConfigForm.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/application/forms/Config/General/ApplicationConfigForm.php b/application/forms/Config/General/ApplicationConfigForm.php index fa1e3b82e0..0e5c700283 100644 --- a/application/forms/Config/General/ApplicationConfigForm.php +++ b/application/forms/Config/General/ApplicationConfigForm.php @@ -70,10 +70,8 @@ public function createElements(array $formData) ) ); - $backends = array(); - foreach (ResourceFactory::getResourceConfigs()->toArray() as $name => $resource) { - $backends[$name] = $name; - } + $backends = array_keys(ResourceFactory::getResourceConfigs()->toArray()); + $backends = array_combine($backends, $backends); $this->addElement( 'select',