X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fpoolcounter%2FPoolCounter.php;h=060faec52ef611064f174b516e65b64c21865eac;hb=11c82a8660fa01f4407c8551b77ec58006b087e8;hp=ba0b4cb318f2d6f389234dc042ab417b84ac850e;hpb=255d76f2a13a8378ded9f0cf1c2bb172f7f07a5b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/poolcounter/PoolCounter.php b/includes/poolcounter/PoolCounter.php index ba0b4cb318..060faec52e 100644 --- a/includes/poolcounter/PoolCounter.php +++ b/includes/poolcounter/PoolCounter.php @@ -39,7 +39,7 @@ * that start with "nowait:". However, only 0 timeouts (non-blocking requests) * can be used with "nowait:" keys. * - * By default PoolCounter_Stub is used, which provides no locking. You + * By default PoolCounterNull is used, which provides no locking. You * can get a useful one in the PoolCounter extension. */ abstract class PoolCounter { @@ -111,7 +111,7 @@ abstract class PoolCounter { public static function factory( $type, $key ) { global $wgPoolCounterConf; if ( !isset( $wgPoolCounterConf[$type] ) ) { - return new PoolCounter_Stub; + return new PoolCounterNull; } $conf = $wgPoolCounterConf[$type]; $class = $conf['class']; @@ -208,23 +208,3 @@ abstract class PoolCounter { return $type . ':' . ( hexdec( substr( sha1( $key ), 0, 4 ) ) % $slots ); } } - -// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps -class PoolCounter_Stub extends PoolCounter { - - public function __construct() { - /* No parameters needed */ - } - - public function acquireForMe() { - return Status::newGood( PoolCounter::LOCKED ); - } - - public function acquireForAnyone() { - return Status::newGood( PoolCounter::LOCKED ); - } - - public function release() { - return Status::newGood( PoolCounter::RELEASED ); - } -}