diff --git a/lib/archive.php b/lib/archive.php
index b4459c2b6ce121b25c10339fd98903699abcc1d4..a9c245eaf433d0db1d9cc8e806d057b61f1b2d57 100644
--- a/lib/archive.php
+++ b/lib/archive.php
@@ -13,14 +13,14 @@ abstract class OC_Archive{
 	 * @return OC_Archive
 	 */
 	public static function open($path) {
-		$ext=substr($path,strrpos($path,'.'));
+		$ext=substr($path, strrpos($path, '.'));
 		switch($ext) {
 			case '.zip':
 				return new OC_Archive_ZIP($path);
 			case '.gz':
 			case '.bz':
 			case '.bz2':
-				if(strpos($path,'.tar.')) {
+				if(strpos($path, '.tar.')) {
 					return new OC_Archive_TAR($path);
 				}
 				break;
@@ -126,9 +126,9 @@ abstract class OC_Archive{
 					continue;
 				}
 				if(is_dir($source.'/'.$file)) {
-					$this->addRecursive($path.'/'.$file,$source.'/'.$file);
+					$this->addRecursive($path.'/'.$file, $source.'/'.$file);
 				}else{
-					$this->addFile($path.'/'.$file,$source.'/'.$file);
+					$this->addFile($path.'/'.$file, $source.'/'.$file);
 				}
 			}
 		}
diff --git a/lib/archive/tar.php b/lib/archive/tar.php
index 21d8057e4d6ca551389394e843332ccf1fd3c8ed..9aaa6d12796c13b1a3fa652666c703de9ec2cd83 100644
--- a/lib/archive/tar.php
+++ b/lib/archive/tar.php
@@ -127,7 +127,10 @@ class OC_Archive_TAR extends OC_Archive{
 			$this->cachedHeaders = $this->tar->listContent();
 		}
 		foreach($this->cachedHeaders as $header) {
-			if($file==$header['filename'] or $file.'/'==$header['filename'] or '/'.$file.'/'==$header['filename'] or '/'.$file==$header['filename']) {
+			if(        $file     == $header['filename']
+				or     $file.'/' == $header['filename']
+				or '/'.$file.'/' == $header['filename']
+				or '/'.$file     == $header['filename']) {
 				return $header;
 			}
 		}
diff --git a/lib/archive/zip.php b/lib/archive/zip.php
index a2b07f1a35d530c180b29a6b93b15b0bbf016d3d..d016c692e357d6e9721f5c0ec62333a1860430a1 100644
--- a/lib/archive/zip.php
+++ b/lib/archive/zip.php
@@ -86,7 +86,7 @@ class OC_Archive_ZIP extends OC_Archive{
 		$pathLength=strlen($path);
 		foreach($files as $file) {
 			if(substr($file, 0, $pathLength)==$path and $file!=$path) {
-				if(strrpos(substr($file, 0, -1),'/')<=$pathLength) {
+				if(strrpos(substr($file, 0, -1), '/')<=$pathLength) {
 					$folderContent[]=substr($file, $pathLength);
 				}
 			}
@@ -161,7 +161,10 @@ class OC_Archive_ZIP extends OC_Archive{
 	function getStream($path,$mode) {
 		if($mode=='r' or $mode=='rb') {
 			return $this->zip->getStream($path);
-		}else{//since we cant directly get a writable stream, make a temp copy of the file and put it back in the archive when the stream is closed
+		} else {
+			//since we cant directly get a writable stream,
+			//make a temp copy of the file and put it back
+			//in the archive when the stream is closed
 			if(strrpos($path, '.')!==false) {
 				$ext=substr($path, strrpos($path, '.'));
 			}else{