@@ 358-365 (lines=8) @@ | ||
355 | ||
356 | private function backupFile($targetFile) |
|
357 | { |
|
358 | if($this->enableBackup === true) |
|
359 | { |
|
360 | if($this->sources->has($targetFile)) |
|
361 | { |
|
362 | $backupFile = $targetFile . Application::BACKUP_SUFFIX; |
|
363 | $this->sources->write($backupFile, $this->sources->read($targetFile), true); |
|
364 | } |
|
365 | } |
|
366 | } |
|
367 | ||
368 | public function rollback() |
|
@@ 385-394 (lines=10) @@ | ||
382 | $targetFile = substr($file, 0, strlen($this->suffix) * -1); |
|
383 | $backupFile = $targetFile . Application::BACKUP_SUFFIX; |
|
384 | ||
385 | if($this->sources->has($backupFile)) |
|
386 | { |
|
387 | $this->info(" Writing $targetFile"); |
|
388 | ||
389 | if($this->dryRun === false) |
|
390 | { |
|
391 | $backupContent = $this->sources->read($backupFile); |
|
392 | $this->sources->write($targetFile, $backupContent, true); |
|
393 | } |
|
394 | } |
|
395 | } |
|
396 | ||
397 | public function getUnusedVariables() |