| Total Complexity | 4 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace AgelxNash\Modx\Evo\Database\Traits; |
||
| 3 | trait ConfigTrait |
||
| 4 | { |
||
| 5 | /** |
||
| 6 | * @var array |
||
| 7 | */ |
||
| 8 | protected $config = []; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * {@inheritDoc} |
||
| 12 | */ |
||
| 13 | 85 | public function getConfig($key = null) |
|
| 14 | { |
||
| 15 | 85 | return ($key === null ? $this->config : (isset($this->config[$key]) ? $this->config[$key] : null)); |
|
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * {@inheritDoc} |
||
| 20 | */ |
||
| 21 | 85 | public function setConfig($data) |
|
| 26 | } |
||
| 27 | } |
||
| 28 |