From fe94aa9e2e1fa7fbbb21357b404ab4fde37d808a Mon Sep 17 00:00:00 2001 From: Fomafix Date: Sat, 16 Mar 2024 11:32:30 +0000 Subject: [PATCH] Use variable to avoid multiple calls of $this->getServiceContainer() Change-Id: If8ace28a7061e440801f0fea1925e294fa4e6b90 --- maintenance/replaceAll.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/maintenance/replaceAll.php b/maintenance/replaceAll.php index ec9c7358..1b1527e0 100644 --- a/maintenance/replaceAll.php +++ b/maintenance/replaceAll.php @@ -379,10 +379,11 @@ EOF; $this->fatalError( 'No matching namespaces.' ); } - $hookHelper = new HookHelper( $this->getServiceContainer()->getHookContainer() ); + $services = $this->getServiceContainer(); + $hookHelper = new HookHelper( $services->getHookContainer() ); $search = new Search( - $this->getServiceContainer()->getMainConfig(), - $this->getServiceContainer()->getDBLoadBalancerFactory() + $services->getMainConfig(), + $services->getDBLoadBalancerFactory() ); foreach ( $this->target as $index => $target ) { $replacement = $this->replacement[$index];