From: Florian Date: Sat, 18 May 2019 18:50:47 +0000 (+0200) Subject: Remove useless use of current and end X-Git-Tag: 1.34.0-rc.0~1662^2 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=e2273bcd864c53a5eb0b6d62d5f4890d937527f8;p=lhc%2Fweb%2Fwiklou.git Remove useless use of current and end The ConfigRepository is not an Interable (any more), so these functions don't have any useable effect. Bug: T221045 Change-Id: I6e5bfd9d922d2838c65d52815590dcad1fe6d284 --- diff --git a/includes/config/ConfigRepository.php b/includes/config/ConfigRepository.php index 2874c334f4..d48eb0ec43 100644 --- a/includes/config/ConfigRepository.php +++ b/includes/config/ConfigRepository.php @@ -189,19 +189,12 @@ class ConfigRepository implements SalvageableService { public function salvage( SalvageableService $other ) { Assert::parameterType( self::class, $other, '$other' ); - /** @var ConfigRepository $other */ - $otherCurrentObj = $other->current(); foreach ( $other->configItems['public'] as $name => $otherConfig ) { if ( isset( $this->configItems['public'][$name] ) ) { continue; } $this->add( $name, $otherConfig ); - - // recover the pointer of the other config repository - if ( $otherCurrentObj === $otherConfig ) { - end( $this->configItems['public'] ); - } } foreach ( $other->configItems['private'] as $name => $otherConfig ) { if ( isset( $this->configItems['private'][$name] ) ) { @@ -209,11 +202,6 @@ class ConfigRepository implements SalvageableService { } $this->add( $name, $otherConfig ); - - // recover the pointer of the other config repository - if ( $otherCurrentObj === $otherConfig ) { - end( $this->configItems['private'] ); - } } // disable $other