| Total Complexity | 7 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | abstract class MigrationPayload |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $configurationPath; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * MigrationPayload constructor. |
||
| 21 | * |
||
| 22 | * @param string $configurationPath |
||
| 23 | */ |
||
| 24 | public function __construct($configurationPath) |
||
| 25 | { |
||
| 26 | $this->configurationPath = $configurationPath; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return string |
||
| 31 | */ |
||
| 32 | public function getConfigurationPath() |
||
| 33 | { |
||
| 34 | return $this->configurationPath; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | public function getConfiguration() |
||
| 41 | { |
||
| 42 | return include $this->configurationPath; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string |
||
| 47 | */ |
||
| 48 | protected function getConfigurationBasePath() |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | public function getIndexName() |
||
| 57 | { |
||
| 58 | return $this->getConfiguration()['index']; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getPrefixedIndexName(): string |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getIndexVersionsPath() |
||
| 75 | } |
||
| 76 | } |
||
| 77 |