| Total Complexity | 6 | 
| Total Lines | 64 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 9 | class ApplyMigrationPayload extends MigrationPayload | ||
| 10 | { | ||
| 11 | |||
| 12 | /** | ||
| 13 | * @var string | ||
| 14 | */ | ||
| 15 | private $targetVersionFile; | ||
| 16 | |||
| 17 | /** | ||
| 18 | * @var int | ||
| 19 | */ | ||
| 20 | private $batchSize; | ||
| 21 | |||
| 22 | /** | ||
| 23 | * ApplyMigrationPayload constructor. | ||
| 24 | * | ||
| 25 | * @param string $configurationPath | ||
| 26 | * @param int $batchSize | ||
| 27 | */ | ||
| 28 | public function __construct($configurationPath, $batchSize) | ||
| 29 |     { | ||
| 30 | parent::__construct($configurationPath); | ||
| 31 | |||
| 32 | $this->batchSize = $batchSize; | ||
| 33 | } | ||
| 34 | |||
| 35 | /** | ||
| 36 | * @param string $targetVersionFile | ||
| 37 | */ | ||
| 38 | public function setTargetVersionFile($targetVersionFile) | ||
| 39 |     { | ||
| 40 | $this->targetVersionFile = $targetVersionFile; | ||
| 41 | } | ||
| 42 | |||
| 43 | /** | ||
| 44 | * @return string | ||
| 45 | */ | ||
| 46 | public function getTargetVersionPath() | ||
| 49 | } | ||
| 50 | |||
| 51 | /** | ||
| 52 | * @return array | ||
| 53 | */ | ||
| 54 | public function getTargetConfiguration() | ||
| 55 |     { | ||
| 56 | return include $this->getTargetVersionPath(); | ||
| 57 | } | ||
| 58 | |||
| 59 | /** | ||
| 60 | * @return string | ||
| 61 | */ | ||
| 62 | public function getTargetVersionName() | ||
| 63 |     { | ||
| 64 | return $this->getTargetConfiguration()['index']; | ||
| 65 | } | ||
| 66 | |||
| 67 | /** | ||
| 68 | * @return int | ||
| 69 | */ | ||
| 70 | public function getBatchSize() | ||
| 73 | } | ||
| 74 | } | ||
| 75 |