diff options
author | Felix Moeller <mail@felixmoeller.de> | 2012-10-23 22:53:54 +0200 |
---|---|---|
committer | Felix Moeller <mail@felixmoeller.de> | 2012-10-23 22:53:54 +0200 |
commit | e73b817a38a824b3119136ea110eda4be15b99d5 (patch) | |
tree | 2679aaf755b1488bf50cb073dbd990fe2761679b /apps/files_encryption | |
parent | 36d0d7590134f5587ab09c67927c3187e8b5c790 (diff) | |
download | nextcloud-server-e73b817a38a824b3119136ea110eda4be15b99d5.tar.gz nextcloud-server-e73b817a38a824b3119136ea110eda4be15b99d5.zip |
Checkstyle: NoSpaceAfterComma
Diffstat (limited to 'apps/files_encryption')
-rw-r--r-- | apps/files_encryption/lib/cryptstream.php | 2 | ||||
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 2 | ||||
-rw-r--r-- | apps/files_encryption/tests/encryption.php | 4 | ||||
-rw-r--r-- | apps/files_encryption/tests/proxy.php | 8 | ||||
-rw-r--r-- | apps/files_encryption/tests/stream.php | 20 |
5 files changed, 18 insertions, 18 deletions
diff --git a/apps/files_encryption/lib/cryptstream.php b/apps/files_encryption/lib/cryptstream.php index 721a1b955df..95b58b8cce7 100644 --- a/apps/files_encryption/lib/cryptstream.php +++ b/apps/files_encryption/lib/cryptstream.php @@ -167,7 +167,7 @@ class OC_CryptStream{ public function stream_close() { $this->flush(); if($this->meta['mode']!='r' and $this->meta['mode']!='rb') { - OC_FileCache::put($this->path,array('encrypted'=>true,'size'=>$this->size),''); + OC_FileCache::put($this->path, array('encrypted'=>true,'size'=>$this->size),''); } return fclose($this->source); } diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index f61cd1e3773..5c19955dbd5 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -68,7 +68,7 @@ class OC_FileProxy_Encryption extends OC_FileProxy{ if (!is_resource($data)) {//stream put contents should have been converter to fopen $size=strlen($data); $data=OC_Crypt::blockEncrypt($data); - OC_FileCache::put($path,array('encrypted'=>true,'size'=>$size),''); + OC_FileCache::put($path, array('encrypted'=>true,'size'=>$size),''); } } } diff --git a/apps/files_encryption/tests/encryption.php b/apps/files_encryption/tests/encryption.php index 89397f6ef2c..a7bc2df0e12 100644 --- a/apps/files_encryption/tests/encryption.php +++ b/apps/files_encryption/tests/encryption.php @@ -19,7 +19,7 @@ class Test_Encryption extends UnitTestCase { $chunk=substr($source,0,8192); $encrypted=OC_Crypt::encrypt($chunk,$key); - $this->assertEqual(strlen($chunk),strlen($encrypted)); + $this->assertEqual(strlen($chunk), strlen($encrypted)); $decrypted=OC_Crypt::decrypt($encrypted,$key); $decrypted=rtrim($decrypted, "\0"); $this->assertEqual($decrypted,$chunk); @@ -66,7 +66,7 @@ class Test_Encryption extends UnitTestCase { $this->assertEqual($decrypted,$source); $encrypted=OC_Crypt::blockEncrypt($source,$key); - $decrypted=OC_Crypt::blockDecrypt($encrypted,$key,strlen($source)); + $decrypted=OC_Crypt::blockDecrypt($encrypted,$key, strlen($source)); $this->assertEqual($decrypted,$source); } } diff --git a/apps/files_encryption/tests/proxy.php b/apps/files_encryption/tests/proxy.php index 042011a6c87..c3c8f4a2db0 100644 --- a/apps/files_encryption/tests/proxy.php +++ b/apps/files_encryption/tests/proxy.php @@ -30,7 +30,7 @@ class Test_CryptProxy extends UnitTestCase { //set up temporary storage OC_Filesystem::clearMounts(); - OC_Filesystem::mount('OC_Filestorage_Temporary',array(),'/'); + OC_Filesystem::mount('OC_Filestorage_Temporary', array(),'/'); OC_Filesystem::init('/'.$user.'/files'); @@ -59,7 +59,7 @@ class Test_CryptProxy extends UnitTestCase { $fromFile=OC_Filesystem::file_get_contents('/file'); $this->assertNotEqual($original,$stored); - $this->assertEqual(strlen($original),strlen($fromFile)); + $this->assertEqual(strlen($original), strlen($fromFile)); $this->assertEqual($original,$fromFile); } @@ -98,7 +98,7 @@ class Test_CryptProxy extends UnitTestCase { $fromFile=OC_Filesystem::file_get_contents('/file'); $this->assertNotEqual($original,$stored); - $this->assertEqual(strlen($original),strlen($fromFile)); + $this->assertEqual(strlen($original), strlen($fromFile)); $this->assertEqual($original,$fromFile); $file=__DIR__.'/zeros'; @@ -112,6 +112,6 @@ class Test_CryptProxy extends UnitTestCase { $fromFile=OC_Filesystem::file_get_contents('/file'); $this->assertNotEqual($original,$stored); - $this->assertEqual(strlen($original),strlen($fromFile)); + $this->assertEqual(strlen($original), strlen($fromFile)); } } diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index 39b13620782..5ea0da48017 100644 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -10,11 +10,11 @@ class Test_CryptStream extends UnitTestCase { private $tmpFiles=array(); function testStream() { - $stream=$this->getStream('test1','w',strlen('foobar')); + $stream=$this->getStream('test1','w', strlen('foobar')); fwrite($stream,'foobar'); fclose($stream); - $stream=$this->getStream('test1','r',strlen('foobar')); + $stream=$this->getStream('test1','r', strlen('foobar')); $data=fread($stream,6); fclose($stream); $this->assertEqual('foobar',$data); @@ -26,10 +26,10 @@ class Test_CryptStream extends UnitTestCase { fclose($target); fclose($source); - $stream=$this->getStream('test2','r',filesize($file)); + $stream=$this->getStream('test2','r', filesize($file)); $data=stream_get_contents($stream); $original=file_get_contents($file); - $this->assertEqual(strlen($original),strlen($data)); + $this->assertEqual(strlen($original), strlen($data)); $this->assertEqual($original,$data); } @@ -59,27 +59,27 @@ class Test_CryptStream extends UnitTestCase { $file=__DIR__.'/binary'; $source=file_get_contents($file); - $stream=$this->getStream('test','w',strlen($source)); + $stream=$this->getStream('test','w', strlen($source)); fwrite($stream,$source); fclose($stream); - $stream=$this->getStream('test','r',strlen($source)); + $stream=$this->getStream('test','r', strlen($source)); $data=stream_get_contents($stream); fclose($stream); - $this->assertEqual(strlen($data),strlen($source)); + $this->assertEqual(strlen($data), strlen($source)); $this->assertEqual($source,$data); $file=__DIR__.'/zeros'; $source=file_get_contents($file); - $stream=$this->getStream('test2','w',strlen($source)); + $stream=$this->getStream('test2','w', strlen($source)); fwrite($stream,$source); fclose($stream); - $stream=$this->getStream('test2','r',strlen($source)); + $stream=$this->getStream('test2','r', strlen($source)); $data=stream_get_contents($stream); fclose($stream); - $this->assertEqual(strlen($data),strlen($source)); + $this->assertEqual(strlen($data), strlen($source)); $this->assertEqual($source,$data); } } |