Remove return-by-reference PHP4-ism from getExternalLB()
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Sep 2016 04:45:54 +0000 (21:45 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Sep 2016 04:45:54 +0000 (21:45 -0700)
Change-Id: Id6184a4a543196c4253dc9d930ac8ac0a9a5b0b0

includes/db/loadbalancer/LBFactory.php
includes/db/loadbalancer/LBFactoryFake.php
includes/db/loadbalancer/LBFactoryMulti.php
includes/db/loadbalancer/LBFactorySimple.php
includes/db/loadbalancer/LBFactorySingle.php

index 2d91bb7..a3e5cb6 100644 (file)
@@ -185,7 +185,7 @@ abstract class LBFactory implements DestructibleService {
         * @param bool|string $wiki Wiki ID, or false for the current wiki
         * @return LoadBalancer
         */
-       abstract public function &getExternalLB( $cluster, $wiki = false );
+       abstract public function getExternalLB( $cluster, $wiki = false );
 
        /**
         * Execute a function for each tracked load balancer
index 33ee250..5cd1d4b 100644 (file)
@@ -40,7 +40,7 @@ class LBFactoryFake extends LBFactory {
                throw new DBAccessError;
        }
 
-       public function &getExternalLB( $cluster, $wiki = false ) {
+       public function getExternalLB( $cluster, $wiki = false ) {
                throw new DBAccessError;
        }
 
index 17e01b9..e56631d 100644 (file)
@@ -293,7 +293,7 @@ class LBFactoryMulti extends LBFactory {
         * @param bool|string $wiki Wiki ID, or false for the current wiki
         * @return LoadBalancer
         */
-       public function &getExternalLB( $cluster, $wiki = false ) {
+       public function getExternalLB( $cluster, $wiki = false ) {
                if ( !isset( $this->extLBs[$cluster] ) ) {
                        $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $wiki );
                        $this->extLBs[$cluster]->parentInfo( [ 'id' => "ext-$cluster" ] );
index 262b0d9..4632b0a 100644 (file)
@@ -122,7 +122,7 @@ class LBFactorySimple extends LBFactory {
         * @param bool|string $wiki
         * @return array
         */
-       public function &getExternalLB( $cluster, $wiki = false ) {
+       public function getExternalLB( $cluster, $wiki = false ) {
                if ( !isset( $this->extLBs[$cluster] ) ) {
                        $this->extLBs[$cluster] = $this->newExternalLB( $cluster, $wiki );
                        $this->extLBs[$cluster]->parentInfo( [ 'id' => "ext-$cluster" ] );
index 14c1c28..14cec0e 100644 (file)
@@ -73,7 +73,7 @@ class LBFactorySingle extends LBFactory {
         * @param bool|string $wiki Wiki ID, or false for the current wiki
         * @return LoadBalancerSingle
         */
-       public function &getExternalLB( $cluster, $wiki = false ) {
+       public function getExternalLB( $cluster, $wiki = false ) {
                return $this->lb;
        }