Skip to content

Commit

Permalink
Renamed variables
Browse files Browse the repository at this point in the history
  • Loading branch information
flip111 authored and Philippe Lagas committed Nov 21, 2013
1 parent 9cbcf5e commit 2d9b227
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Metadata/Cache/FileCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ public function putClassMetadataInCache(ClassMetadata $metadata)
/**
* Renames a file with fallback for windows
*
* @param string $oldname
* @param string $newname
* @param string $source
* @param string $target
*/
private function renameFile($oldname, $newname) {
if (false === @rename($oldname, $newname)) {
private function renameFile($source, $target) {
if (false === @rename($source, $target)) {
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
if (false === copy($oldname, $newname)) {
throw new \RuntimeException(sprintf('(WIN) Could not write new cache file to %s.', $newname));
if (false === copy($source, $target)) {
throw new \RuntimeException(sprintf('(WIN) Could not write new cache file to %s.', $target));
}
if (false === unlink($oldname)) {
throw new \RuntimeException(sprintf('(WIN) Could not delete temp cache file to %s.', $oldname));
if (false === unlink($source)) {
throw new \RuntimeException(sprintf('(WIN) Could not delete temp cache file to %s.', $source));
}
} else {
throw new \RuntimeException(sprintf('Could not write new cache file to %s.', $newname));
throw new \RuntimeException(sprintf('Could not write new cache file to %s.', $target));
}
}
}
Expand Down

0 comments on commit 2d9b227

Please sign in to comment.