diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2014-02-18 17:30:26 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2014-02-18 17:30:26 +0100 |
commit | 3b1083f46eb7dd67faddc8214799ee6396ffdea9 (patch) | |
tree | 74c03cc55aed8c776720ff8c0abb4ce2561a73c8 | |
parent | 92560c5b86cb88920b6e439bdf4b90f1d59e9b6c (diff) | |
parent | 2c6411b8977e4d17e6489c5a1b768f9de93ba280 (diff) | |
download | nextcloud-server-3b1083f46eb7dd67faddc8214799ee6396ffdea9.tar.gz nextcloud-server-3b1083f46eb7dd67faddc8214799ee6396ffdea9.zip |
Merge pull request #7176 from owncloud/style
Some style fixes
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 2 | ||||
-rw-r--r-- | lib/private/allconfig.php | 4 | ||||
-rw-r--r-- | lib/private/config.php | 4 | ||||
-rw-r--r-- | lib/private/db/mdb2schemareader.php | 3 | ||||
-rw-r--r-- | lib/public/config.php | 4 | ||||
-rw-r--r-- | lib/public/iconfig.php | 4 | ||||
-rw-r--r-- | tests/lib/db.php | 2 | ||||
-rw-r--r-- | tests/lib/dbschema.php | 2 |
8 files changed, 13 insertions, 12 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 2ea477a6e4d..9d456f6c517 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -262,7 +262,7 @@ class Proxy extends \OC_FileProxy { } elseif ( self::shouldEncrypt($path) - and $meta ['mode'] !== 'r' + and $meta['mode'] !== 'r' and $meta['mode'] !== 'rb' ) { $result = fopen('crypt://' . $path, $meta['mode']); diff --git a/lib/private/allconfig.php b/lib/private/allconfig.php index a4aa69d43fb..de3ac973637 100644 --- a/lib/private/allconfig.php +++ b/lib/private/allconfig.php @@ -17,7 +17,7 @@ class AllConfig implements \OCP\IConfig { * Sets a new system wide value * * @param string $key the key of the value, under which will be saved - * @param string $value the value that should be stored + * @param mixed $value the value that should be stored * @todo need a use case for this */ // public function setSystemValue($key, $value) { @@ -28,7 +28,7 @@ class AllConfig implements \OCP\IConfig { * Looks up a system wide defined value * * @param string $key the key of the value, under which it was saved - * @param string $default the default value to be returned if the value isn't set + * @param mixed $default the default value to be returned if the value isn't set * @return string the saved value */ public function getSystemValue($key, $default = '') { diff --git a/lib/private/config.php b/lib/private/config.php index 8a9d5ca6158..8399d0defbd 100644 --- a/lib/private/config.php +++ b/lib/private/config.php @@ -77,7 +77,7 @@ class Config { /** * @brief Gets a value from config.php * @param string $key key - * @param string $default = null default value + * @param mixed $default = null default value * @return string the value or $default * * This function gets the value from config.php. If it does not exist, @@ -94,7 +94,7 @@ class Config { /** * @brief Sets a value * @param string $key key - * @param string $value value + * @param mixed $value value * * This function sets the value and writes the config.php. * diff --git a/lib/private/db/mdb2schemareader.php b/lib/private/db/mdb2schemareader.php index b1fd2454cb0..f9a76786c3e 100644 --- a/lib/private/db/mdb2schemareader.php +++ b/lib/private/db/mdb2schemareader.php @@ -288,12 +288,13 @@ class MDB2SchemaReader { if (!empty($fields)) { if (isset($primary) && $primary) { $table->setPrimaryKey($fields, $name); - } else + } else { if (isset($unique) && $unique) { $table->addUniqueIndex($fields, $name); } else { $table->addIndex($fields, $name); } + } } else { throw new \DomainException('Empty index definition: ' . $name . ' options:' . print_r($fields, true)); } diff --git a/lib/public/config.php b/lib/public/config.php index d9355a0605f..c1cc1034878 100644 --- a/lib/public/config.php +++ b/lib/public/config.php @@ -42,7 +42,7 @@ class Config { /** * Gets a value from config.php * @param string $key key - * @param string $default = null default value + * @param mixed $default = null default value * @return string the value or $default * * This function gets the value from config.php. If it does not exist, @@ -55,7 +55,7 @@ class Config { /** * Sets a value * @param string $key key - * @param string $value value + * @param mixed $value value * @return bool * * This function sets the value and writes the config.php. If the file can diff --git a/lib/public/iconfig.php b/lib/public/iconfig.php index 1d0f8e0015c..585ee2812dc 100644 --- a/lib/public/iconfig.php +++ b/lib/public/iconfig.php @@ -38,7 +38,7 @@ interface IConfig { * Sets a new system wide value * * @param string $key the key of the value, under which will be saved - * @param string $value the value that should be stored + * @param mixed $value the value that should be stored * @todo need a use case for this */ // public function setSystemValue($key, $value); @@ -47,7 +47,7 @@ interface IConfig { * Looks up a system wide defined value * * @param string $key the key of the value, under which it was saved - * @param string $default the default value to be returned if the value isn't set + * @param mixed $default the default value to be returned if the value isn't set * @return string the saved value */ public function getSystemValue($key, $default = ''); diff --git a/tests/lib/db.php b/tests/lib/db.php index f0b271a36f1..2fca67b5638 100644 --- a/tests/lib/db.php +++ b/tests/lib/db.php @@ -30,7 +30,7 @@ class Test_DB extends PHPUnit_Framework_TestCase { public function setUp() { $dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml'; - $r = '_'.OC_Util::generateRandomBytes('4').'_'; + $r = '_'.OC_Util::generateRandomBytes(4).'_'; $content = file_get_contents( $dbfile ); $content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content ); file_put_contents( self::$schema_file, $content ); diff --git a/tests/lib/dbschema.php b/tests/lib/dbschema.php index 4a7b7f7aac0..e8a43538004 100644 --- a/tests/lib/dbschema.php +++ b/tests/lib/dbschema.php @@ -16,7 +16,7 @@ class Test_DBSchema extends PHPUnit_Framework_TestCase { $dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml'; $dbfile2 = OC::$SERVERROOT.'/tests/data/db_structure2.xml'; - $r = '_'.OC_Util::generateRandomBytes('4').'_'; + $r = '_'.OC_Util::generateRandomBytes(4).'_'; $content = file_get_contents( $dbfile ); $content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content ); file_put_contents( $this->schema_file, $content ); |