Code Duplication    Length = 9-9 lines in 2 locations

includes/cache/localisation/LCStoreStaticArray.php 1 location

@@ 39-47 (lines=9) @@
36
	/** @var string Directory for cache files. */
37
	private $directory;
38
39
	public function __construct( $conf = [] ) {
40
		global $wgCacheDirectory;
41
42
		if ( isset( $conf['directory'] ) ) {
43
			$this->directory = $conf['directory'];
44
		} else {
45
			$this->directory = $wgCacheDirectory;
46
		}
47
	}
48
49
	public function startWrite( $code ) {
50
		$this->currentLang = $code;

includes/cache/localisation/LCStoreCDB.php 1 location

@@ 50-58 (lines=9) @@
47
	/** @var bool|string Cache directory. False if not set */
48
	private $directory;
49
50
	function __construct( $conf = [] ) {
51
		global $wgCacheDirectory;
52
53
		if ( isset( $conf['directory'] ) ) {
54
			$this->directory = $conf['directory'];
55
		} else {
56
			$this->directory = $wgCacheDirectory;
57
		}
58
	}
59
60
	public function get( $code, $key ) {
61
		if ( !isset( $this->readers[$code] ) ) {