X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Flibs%2Fstats%2FNullStatsdDataFactory.php;h=4fa0248e6045135aaa5fa5a9f175e43ce13474a7;hb=f7e1770fb832aa77bf4e16ce8cc815f2b24dd10d;hp=fee792fdd1ce32f4be9cb628e63219d45a6b5d3f;hpb=4cb9c1a24bde6e29c5e8f05c7cd1de54ffdd342a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/stats/NullStatsdDataFactory.php b/includes/libs/stats/NullStatsdDataFactory.php index fee792fdd1..4fa0248e60 100644 --- a/includes/libs/stats/NullStatsdDataFactory.php +++ b/includes/libs/stats/NullStatsdDataFactory.php @@ -8,7 +8,7 @@ use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface; * @author Addshore * @since 1.27 */ -class NullStatsdDataFactory implements StatsdDataFactoryInterface { +class NullStatsdDataFactory implements MediawikiStatsdDataFactory { /** * This function creates a 'timing' StatsdData. @@ -108,4 +108,28 @@ class NullStatsdDataFactory implements StatsdDataFactoryInterface { return $data; } + /** + * Check whether this data factory has any data. + * @return boolean + */ + public function hasData() { + return false; + } + + /** + * Return data from the factory. + * @return StatsdData[] + */ + public function getData() { + return []; + } + + /** + * Set collection enable status. + * @param bool $enabled Will collection be enabled? + * @return void + */ + public function setEnabled( $enabled ) { + // Nothing to do, null factory is always disabled. + } }