[Pkg-owncloud-commits] [owncloud] 72/153: Fix whitespace issues

David Prévot taffit at moszumanska.debian.org
Tue May 27 03:05:37 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit e7aebc5c32c783f75a26f6ebc8116886a8cb55cf
Author: Robin McCorkell <rmccorkell at karoshi.org.uk>
Date:   Thu May 15 21:47:28 2014 +0100

    Fix whitespace issues
---
 apps/files/index.php                  |  4 ++--
 apps/files_encryption/lib/session.php |  2 +-
 apps/files_encryption/lib/stream.php  |  2 +-
 apps/files_external/lib/amazons3.php  |  2 +-
 apps/files_external/lib/swift.php     | 32 +++++++++++++++----------------
 apps/files_sharing/lib/cache.php      |  2 +-
 apps/files_sharing/tests/api.php      | 10 +++++-----
 apps/user_ldap/group_ldap.php         |  4 ++--
 apps/user_ldap/group_proxy.php        | 14 +++++++-------
 apps/user_ldap/lib/access.php         | 10 +++++-----
 apps/user_ldap/lib/connection.php     |  2 +-
 apps/user_ldap/lib/jobs.php           | 36 +++++++++++++++++------------------
 apps/user_ldap/lib/wizard.php         |  4 ++--
 apps/user_ldap/settings.php           |  2 +-
 apps/user_ldap/user_ldap.php          |  4 ++--
 apps/user_ldap/user_proxy.php         |  8 ++++----
 16 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/apps/files/index.php b/apps/files/index.php
index 9d4007d..e24c535 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -68,8 +68,8 @@ $storageInfo=OC_Helper::getStorageInfo('/', $dirInfo);
 // if the encryption app is disabled, than everything is fine (INIT_SUCCESSFUL status code)
 $encryptionInitStatus = 2;
 if (OC_App::isEnabled('files_encryption')) {
-    $session = new \OCA\Encryption\Session(new \OC\Files\View('/'));
-    $encryptionInitStatus = $session->getInitialized();
+	$session = new \OCA\Encryption\Session(new \OC\Files\View('/'));
+	$encryptionInitStatus = $session->getInitialized();
 }
 
 $nav = new OCP\Template('files', 'appnavigation', '');
diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php
index a387001..f900142 100644
--- a/apps/files_encryption/lib/session.php
+++ b/apps/files_encryption/lib/session.php
@@ -121,7 +121,7 @@ class Session {
 
 	/**
 	 * @brief Sets status of encryption app
-	 * @param string $init  INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INITIALIZED
+	 * @param string $init INIT_SUCCESSFUL, INIT_EXECUTED, NOT_INITIALIZED
 	 * @return bool
 	 *
 	 * @note this doesn not indicate of the init was successful, we just remeber the try!
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index 9a204e0..1008eba 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -180,7 +180,7 @@ class Stream {
 
 	/**
 	 * @brief Returns the current position of the file pointer
-	 * @return int  position of the file pointer
+	 * @return int position of the file pointer
 	 */
 	public function stream_tell() {
 		return ftell($this->handle);
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 2093fb7..7ff17f0 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -25,7 +25,7 @@
 namespace OC\Files\Storage;
 
 set_include_path(get_include_path() . PATH_SEPARATOR .
-        \OC_App::getAppPath('files_external') . '/3rdparty/aws-sdk-php');
+	\OC_App::getAppPath('files_external') . '/3rdparty/aws-sdk-php');
 require 'aws-autoloader.php';
 
 use Aws\S3\S3Client;
diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php
index a202d38..0336486 100644
--- a/apps/files_external/lib/swift.php
+++ b/apps/files_external/lib/swift.php
@@ -23,7 +23,7 @@
 namespace OC\Files\Storage;
 
 set_include_path(get_include_path() . PATH_SEPARATOR .
-        \OC_App::getAppPath('files_external') . '/3rdparty/php-opencloud/lib');
+	\OC_App::getAppPath('files_external') . '/3rdparty/php-opencloud/lib');
 require_once 'openstack.php';
 
 use \OpenCloud;
@@ -31,25 +31,25 @@ use \OpenCloud\Common\Exceptions;
 
 class Swift extends \OC\Files\Storage\Common {
 
-        /**
-         * @var \OpenCloud\ObjectStore
-         */
+	/**
+	 * @var \OpenCloud\ObjectStore
+	 */
 	private $connection;
-        /**
-         * @var \OpenCloud\ObjectStore\Container
-         */
+	/**
+	 * @var \OpenCloud\ObjectStore\Container
+	 */
 	private $container;
-        /**
-         * @var \OpenCloud\OpenStack
-         */
+	/**
+	 * @var \OpenCloud\OpenStack
+	 */
 	private $anchor;
-        /**
-         * @var string
-         */
+	/**
+	 * @var string
+	 */
 	private $bucket;
-        /**
-         * @var array
-         */
+	/**
+	 * @var array
+	 */
 	private static $tmpFiles = array();
 
 	/**
diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php
index 6a6c737..f793c19 100644
--- a/apps/files_sharing/lib/cache.php
+++ b/apps/files_sharing/lib/cache.php
@@ -424,7 +424,7 @@ class Shared_Cache extends Cache {
 	 *
 	 * @param int $id
 	 * @param string $pathEnd (optional) used internally for recursive calls
-	 * @return string | null
+	 * @return string|null
 	 */
 	public function getPathById($id, $pathEnd = '') {
 		// direct shares are easy
diff --git a/apps/files_sharing/tests/api.php b/apps/files_sharing/tests/api.php
index 7c5326f..615eacc 100644
--- a/apps/files_sharing/tests/api.php
+++ b/apps/files_sharing/tests/api.php
@@ -187,7 +187,7 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
 
 		$this->assertTrue($result->succeeded());
 
-        // test should return two shares created from testCreateShare()
+		// test should return two shares created from testCreateShare()
 		$this->assertTrue(count($result->getData()) === 1);
 
 		\OCP\Share::unshare('file', $fileinfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
@@ -214,7 +214,7 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
 
 		$this->assertTrue($result->succeeded());
 
-        // test should return one share created from testCreateShare()
+		// test should return one share created from testCreateShare()
 		$this->assertTrue(count($result->getData()) === 2);
 
 		\OCP\Share::unshare('file', $fileInfo['fileid'], \OCP\Share::SHARE_TYPE_USER,
@@ -341,7 +341,7 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
 
 		$this->assertTrue($result->succeeded());
 
-        // test should return one share within $this->folder
+		// test should return one share within $this->folder
 		$this->assertTrue(count($result->getData()) === 1);
 
 		\OCP\Share::unshare('file', $fileInfo1['fileid'], \OCP\Share::SHARE_TYPE_USER,
@@ -698,7 +698,7 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
 		$result = Share\Api::getShare($params);
 
 		$this->assertEquals(404, $result->getStatusCode());
-        $meta = $result->getMeta();
+		$meta = $result->getMeta();
 		$this->assertEquals('share doesn\'t exist', $meta['message']);
 
 	}
@@ -755,7 +755,7 @@ class Test_Files_Sharing_Api extends Test_Files_Sharing_Base {
 
 		$result = Share\Api::updateShare($params);
 
-        $meta = $result->getMeta();
+		$meta = $result->getMeta();
 		$this->assertTrue($result->succeeded(), $meta['message']);
 
 		$items = \OCP\Share::getItemShared('file', $userShare['file_source']);
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index 8b7d282..b34dc33 100644
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -177,8 +177,8 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
 		}
 		$allGroups = array();
 		if (array_key_exists($dn, $seen)) {
-		    // avoid loops
-		    return array();
+			// avoid loops
+			return array();
 		}
 		$seen[$dn] = true;
 		$filter = $this->access->combineFilterWithAnd(array(
diff --git a/apps/user_ldap/group_proxy.php b/apps/user_ldap/group_proxy.php
index 672e8a6..7e40162 100644
--- a/apps/user_ldap/group_proxy.php
+++ b/apps/user_ldap/group_proxy.php
@@ -36,7 +36,7 @@ class Group_Proxy extends lib\Proxy implements \OCP\GroupInterface {
 	public function __construct($serverConfigPrefixes, ILDAPWrapper $ldap) {
 		parent::__construct($ldap);
 		foreach($serverConfigPrefixes as $configPrefix) {
-		    $this->backends[$configPrefix] =
+			$this->backends[$configPrefix] =
 				new \OCA\user_ldap\GROUP_LDAP($this->getAccess($configPrefix));
 			if(is_null($this->refBackend)) {
 				$this->refBackend = &$this->backends[$configPrefix];
@@ -54,10 +54,10 @@ class Group_Proxy extends lib\Proxy implements \OCP\GroupInterface {
 	protected function walkBackends($gid, $method, $parameters) {
 		$cacheKey = $this->getGroupCacheKey($gid);
 		foreach($this->backends as $configPrefix => $backend) {
-		    if($result = call_user_func_array(array($backend, $method), $parameters)) {
+			if($result = call_user_func_array(array($backend, $method), $parameters)) {
 				$this->writeToCache($cacheKey, $configPrefix);
 				return $result;
-		    }
+			}
 		}
 		return false;
 	}
@@ -118,7 +118,7 @@ class Group_Proxy extends lib\Proxy implements \OCP\GroupInterface {
 		$groups = array();
 
 		foreach($this->backends as $backend) {
-		    $backendGroups = $backend->getUserGroups($uid);
+			$backendGroups = $backend->getUserGroups($uid);
 			if (is_array($backendGroups)) {
 				$groups = array_merge($groups, $backendGroups);
 			}
@@ -135,7 +135,7 @@ class Group_Proxy extends lib\Proxy implements \OCP\GroupInterface {
 		$users = array();
 
 		foreach($this->backends as $backend) {
-		    $backendUsers = $backend->usersInGroup($gid, $search, $limit, $offset);
+			$backendUsers = $backend->usersInGroup($gid, $search, $limit, $offset);
 			if (is_array($backendUsers)) {
 				$users = array_merge($users, $backendUsers);
 			}
@@ -148,7 +148,7 @@ class Group_Proxy extends lib\Proxy implements \OCP\GroupInterface {
 	 * @brief returns the number of users in a group, who match the search term
 	 * @param string $gid the internal group name
 	 * @param string $search optional, a search string
-	 * @return int | bool
+	 * @return int|bool
 	 */
 	public function countUsersInGroup($gid, $search = '') {
 		return $this->handleRequest(
@@ -165,7 +165,7 @@ class Group_Proxy extends lib\Proxy implements \OCP\GroupInterface {
 		$groups = array();
 
 		foreach($this->backends as $backend) {
-		    $backendGroups = $backend->getGroups($search, $limit, $offset);
+			$backendGroups = $backend->getGroups($search, $limit, $offset);
 			if (is_array($backendGroups)) {
 				$groups = array_merge($groups, $backendGroups);
 			}
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 957a7c2..441eb40 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -138,7 +138,7 @@ class Access extends LDAPUtility {
 		if(is_array($dn)) {
 			$result = array();
 			foreach($dn as $singleDN) {
-			    $result[] = $this->sanitizeDN($singleDN);
+				$result[] = $this->sanitizeDN($singleDN);
 			}
 			return $result;
 		}
@@ -897,7 +897,7 @@ class Access extends LDAPUtility {
 
 		$findings = array();
 		foreach($sr as $res) {
-		    $findings = array_merge($findings, $this->ldap->getEntries($cr	, $res ));
+			$findings = array_merge($findings, $this->ldap->getEntries($cr	, $res ));
 		}
 
 		$this->processPagedSearchStatus($sr, $filter, $base, $findings['count'],
@@ -1028,10 +1028,10 @@ class Access extends LDAPUtility {
 	private function combineFilter($filters, $operator) {
 		$combinedFilter = '('.$operator;
 		foreach($filters as $filter) {
-		    if(!empty($filter) && $filter[0] !== '(') {
+			if(!empty($filter) && $filter[0] !== '(') {
 				$filter = '('.$filter.')';
-		    }
-		    $combinedFilter.=$filter;
+			}
+			$combinedFilter.=$filter;
 		}
 		$combinedFilter.=')';
 		return $combinedFilter;
diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 7e2f8d1..3a900a6 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -289,7 +289,7 @@ class Connection extends LDAPUtility {
 	private function doSoftValidation() {
 		//if User or Group Base are not set, take over Base DN setting
 		foreach(array('ldapBaseUsers', 'ldapBaseGroups') as $keyBase) {
-		    $val = $this->configuration->$keyBase;
+			$val = $this->configuration->$keyBase;
 			if(empty($val)) {
 				$obj = strpos('Users', $keyBase) !== false ? 'Users' : 'Groups';
 				\OCP\Util::writeLog('user_ldap',
diff --git a/apps/user_ldap/lib/jobs.php b/apps/user_ldap/lib/jobs.php
index 34977dd..19c041e 100644
--- a/apps/user_ldap/lib/jobs.php
+++ b/apps/user_ldap/lib/jobs.php
@@ -80,26 +80,26 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
 		');
 		foreach($groups as $group) {
 			//we assume, that self::$groupsFromDB has been retrieved already
-		    $knownUsers = unserialize(self::$groupsFromDB[$group]['owncloudusers']);
-		    $actualUsers = self::getGroupBE()->usersInGroup($group);
-		    $hasChanged = false;
-		    foreach(array_diff($knownUsers, $actualUsers) as $removedUser) {
-		        \OCP\Util::emitHook('OC_User', 'post_removeFromGroup', array('uid' => $removedUser, 'gid' => $group));
-		        \OCP\Util::writeLog('user_ldap',
+			$knownUsers = unserialize(self::$groupsFromDB[$group]['owncloudusers']);
+			$actualUsers = self::getGroupBE()->usersInGroup($group);
+			$hasChanged = false;
+			foreach(array_diff($knownUsers, $actualUsers) as $removedUser) {
+				\OCP\Util::emitHook('OC_User', 'post_removeFromGroup', array('uid' => $removedUser, 'gid' => $group));
+				\OCP\Util::writeLog('user_ldap',
 				'bgJ "updateGroups" – "'.$removedUser.'" removed from "'.$group.'".',
 				\OCP\Util::INFO);
-		        $hasChanged = true;
-		    }
-		    foreach(array_diff($actualUsers, $knownUsers) as $addedUser) {
-		        \OCP\Util::emitHook('OC_User', 'post_addToGroup', array('uid' => $addedUser, 'gid' => $group));
-		        \OCP\Util::writeLog('user_ldap',
+				$hasChanged = true;
+			}
+			foreach(array_diff($actualUsers, $knownUsers) as $addedUser) {
+				\OCP\Util::emitHook('OC_User', 'post_addToGroup', array('uid' => $addedUser, 'gid' => $group));
+				\OCP\Util::writeLog('user_ldap',
 				'bgJ "updateGroups" – "'.$addedUser.'" added to "'.$group.'".',
 				\OCP\Util::INFO);
-		        $hasChanged = true;
-		    }
-		    if($hasChanged) {
+				$hasChanged = true;
+			}
+			if($hasChanged) {
 				$query->execute(array(serialize($actualUsers), $group));
-		    }
+			}
 		}
 		\OCP\Util::writeLog('user_ldap',
 			'bgJ "updateGroups" – FINISHED dealing with known Groups.',
@@ -121,7 +121,7 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
 				'bgJ "updateGroups" – new group "'.$createdGroup.'" found.',
 				\OCP\Util::INFO);
 			$users = serialize(self::getGroupBE()->usersInGroup($createdGroup));
-		    $query->execute(array($createdGroup, $users));
+			$query->execute(array($createdGroup, $users));
 		}
 		\OCP\Util::writeLog('user_ldap',
 			'bgJ "updateGroups" – FINISHED dealing with created Groups.',
@@ -142,7 +142,7 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
 			\OCP\Util::writeLog('user_ldap',
 				'bgJ "updateGroups" – group "'.$removedGroup.'" was removed.',
 				\OCP\Util::INFO);
-		    $query->execute(array($removedGroup));
+			$query->execute(array($removedGroup));
 		}
 		\OCP\Util::writeLog('user_ldap',
 			'bgJ "updateGroups" – FINISHED dealing with removed groups.',
@@ -184,7 +184,7 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
 		$result = $query->execute()->fetchAll();
 		self::$groupsFromDB = array();
 		foreach($result as $dataset) {
-		    self::$groupsFromDB[$dataset['owncloudname']] = $dataset;
+			self::$groupsFromDB[$dataset['owncloudname']] = $dataset;
 		}
 
 		return self::$groupsFromDB;
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php
index 62dd138..d1f3f7b 100644
--- a/apps/user_ldap/lib/wizard.php
+++ b/apps/user_ldap/lib/wizard.php
@@ -641,7 +641,7 @@ class Wizard extends LDAPUtility {
 				//assuming only groups have their cn cached :)
 				continue;
 			}
-		    $filter = strtolower($filterPrefix . $dn . $filterSuffix);
+			$filter = strtolower($filterPrefix . $dn . $filterSuffix);
 			$rr = $this->ldap->search($cr, $base, $filter, array('dn'));
 			if(!$this->ldap->isResource($rr)) {
 				continue;
@@ -776,7 +776,7 @@ class Wizard extends LDAPUtility {
 				if(is_array($attrsToFilter) && count($attrsToFilter) > 0) {
 					$filterAttributes = '(|';
 					foreach($attrsToFilter as $attribute) {
-					    $filterAttributes .= '(' . $attribute . $loginpart . ')';
+						$filterAttributes .= '(' . $attribute . $loginpart . ')';
 					}
 					$filterAttributes .= ')';
 					$parts++;
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index 6b7d8e6..7acc997 100644
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -71,7 +71,7 @@ $tmpl->assign('settingControls', $sControls);
 $config = new \OCA\user_ldap\lib\Configuration('', false);
 $defaults = $config->getDefaults();
 foreach($defaults as $key => $default) {
-    $tmpl->assign($key.'_default', $default);
+	$tmpl->assign($key.'_default', $default);
 }
 
 return $tmpl->fetchPage();
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 8a1cca4..7e8c557 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -372,7 +372,7 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
 		return $displayNames;
 	}
 
-		/**
+	/**
 	* @brief Check if backend implements actions
 	* @param int $actions bitwise-or'ed actions
 	* @return boolean
@@ -399,7 +399,7 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface {
 	/**
 	 * counts the users in LDAP
 	 *
-	 * @return int | bool
+	 * @return int|bool
 	 */
 	public function countUsers() {
 		$filter = \OCP\Util::mb_str_replace(
diff --git a/apps/user_ldap/user_proxy.php b/apps/user_ldap/user_proxy.php
index a134d1c..77d08ad 100644
--- a/apps/user_ldap/user_proxy.php
+++ b/apps/user_ldap/user_proxy.php
@@ -36,7 +36,7 @@ class User_Proxy extends lib\Proxy implements \OCP\UserInterface {
 	public function __construct($serverConfigPrefixes, ILDAPWrapper $ldap) {
 		parent::__construct($ldap);
 		foreach($serverConfigPrefixes as $configPrefix) {
-		    $this->backends[$configPrefix] =
+			$this->backends[$configPrefix] =
 				new \OCA\user_ldap\USER_LDAP($this->getAccess($configPrefix));
 			if(is_null($this->refBackend)) {
 				$this->refBackend = &$this->backends[$configPrefix];
@@ -51,7 +51,7 @@ class User_Proxy extends lib\Proxy implements \OCP\UserInterface {
 	 * @param array $parameters an array of parameters to be passed
 	 * @return mixed the result of the method or false
 	 */
-	protected  function walkBackends($uid, $method, $parameters) {
+	protected function walkBackends($uid, $method, $parameters) {
 		$cacheKey = $this->getUserCacheKey($uid);
 		foreach($this->backends as $configPrefix => $backend) {
 			$instance = $backend;
@@ -75,7 +75,7 @@ class User_Proxy extends lib\Proxy implements \OCP\UserInterface {
 	 * @param mixed $passOnWhen the result matches this variable
 	 * @return mixed the result of the method or false
 	 */
-	protected  function callOnLastSeenOn($uid, $method, $parameters, $passOnWhen) {
+	protected function callOnLastSeenOn($uid, $method, $parameters, $passOnWhen) {
 		$cacheKey = $this->getUserCacheKey($uid);
 		$prefix = $this->getFromCache($cacheKey);
 		//in case the uid has been found in the past, try this stored connection first
@@ -185,7 +185,7 @@ class User_Proxy extends lib\Proxy implements \OCP\UserInterface {
 
 	/**
 	 * @brief Get a list of all display names
-	 * @return array with  all displayNames (value) and the corresponding uids (key)
+	 * @return array with all displayNames (value) and the corresponding uids (key)
 	 *
 	 * Get a list of all display names and user ids.
 	 */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list