| Total Complexity | 2 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | trait MagicStoreTrait |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Used at constructor. Store all constructor parameters as object variables |
||
| 18 | * If exist optional parameter $keys - store only this variables (for example if |
||
| 19 | * call parent constructor which same this methods call) |
||
| 20 | * CALL ONLY FROM CONSTRUCTOR |
||
| 21 | * |
||
| 22 | * $this->_store(get_defined_vars()); |
||
| 23 | * |
||
| 24 | * @param array $data |
||
| 25 | * @param array $keys |
||
| 26 | * @return void |
||
| 27 | */ |
||
| 28 | protected function _store(array $data, ?array $keys = null) : void |
||
| 35 |