| Total Complexity | 10 |
| Total Lines | 68 |
| Duplicated Lines | 0 % |
| Coverage | 96.3% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | trait HasConfigTrait |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var null|Config |
||
| 16 | */ |
||
| 17 | protected $config = null; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @return Config |
||
| 21 | */ |
||
| 22 | 2 | public function getConfig() |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param null $config |
||
|
|
|||
| 32 | */ |
||
| 33 | 2 | public function setConfig($config) |
|
| 36 | 2 | } |
|
| 37 | |||
| 38 | /** |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | 1 | public function getCachedConfigPath() |
|
| 42 | { |
||
| 43 | 1 | $path = Helper::normalizePath(Helper::getBasePath(), 'bootstrap', 'cache', 'migrations.php'); |
|
| 44 | 1 | if (!file_exists($path)) { |
|
| 45 | 1 | $this->generateCachedConfig($path); |
|
| 46 | } |
||
| 47 | 1 | return $path; |
|
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param $path |
||
| 52 | */ |
||
| 53 | 1 | protected function generateCachedConfig($path) |
|
| 56 | 1 | } |
|
| 57 | |||
| 58 | 2 | protected function initConfig() |
|
| 61 | 2 | } |
|
| 62 | |||
| 63 | /** |
||
| 64 | * @return Config |
||
| 65 | */ |
||
| 66 | 2 | protected function generateConfig() |
|
| 82 |