Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
AbstractStore
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 1
 setOptions
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getOption
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace MediaWiki\Extension\CommunityConfiguration\Store;
4
5abstract class AbstractStore implements IConfigurationStore {
6
7    private array $options = [];
8
9    /**
10     * @inheritDoc
11     */
12    public function setOptions( array $options ): void {
13        $this->options = $options;
14    }
15
16    /**
17     * Get a store option
18     *
19     * Options can be modified via setOptions()
20     *
21     * @see IConfigurationStore::setOptions()
22     * @param string $key
23     * @return mixed Option value or null if not found
24     */
25    protected function getOption( string $key ) {
26        return $this->options[$key] ?? null;
27    }
28}