summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Proxy.php
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /apps/user_ldap/lib/Proxy.php
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
downloadnextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz
nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/user_ldap/lib/Proxy.php')
-rw-r--r--apps/user_ldap/lib/Proxy.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/user_ldap/lib/Proxy.php b/apps/user_ldap/lib/Proxy.php
index b077b0d5a86..7698895eaf0 100644
--- a/apps/user_ldap/lib/Proxy.php
+++ b/apps/user_ldap/lib/Proxy.php
@@ -50,7 +50,7 @@ abstract class Proxy {
public function __construct(ILDAPWrapper $ldap) {
$this->ldap = $ldap;
$memcache = \OC::$server->getMemCacheFactory();
- if($memcache->isAvailable()) {
+ if ($memcache->isAvailable()) {
$this->cache = $memcache->createDistributed();
}
}
@@ -68,7 +68,7 @@ abstract class Proxy {
static $db;
static $coreUserManager;
static $coreNotificationManager;
- if($fs === null) {
+ if ($fs === null) {
$ocConfig = \OC::$server->getConfig();
$fs = new FilesystemHelper();
$log = new LogWrapper();
@@ -94,7 +94,7 @@ abstract class Proxy {
* @return mixed
*/
protected function getAccess($configPrefix) {
- if(!isset(self::$accesses[$configPrefix])) {
+ if (!isset(self::$accesses[$configPrefix])) {
$this->addAccess($configPrefix);
}
return self::$accesses[$configPrefix];
@@ -149,7 +149,7 @@ abstract class Proxy {
*/
protected function handleRequest($id, $method, $parameters, $passOnWhen = false) {
$result = $this->callOnLastSeenOn($id, $method, $parameters, $passOnWhen);
- if($result === $passOnWhen) {
+ if ($result === $passOnWhen) {
$result = $this->walkBackends($id, $method, $parameters);
}
return $result;
@@ -161,7 +161,7 @@ abstract class Proxy {
*/
private function getCacheKey($key) {
$prefix = 'LDAP-Proxy-';
- if($key === null) {
+ if ($key === null) {
return $prefix;
}
return $prefix.hash('sha256', $key);
@@ -172,7 +172,7 @@ abstract class Proxy {
* @return mixed|null
*/
public function getFromCache($key) {
- if($this->cache === null) {
+ if ($this->cache === null) {
return null;
}
@@ -190,7 +190,7 @@ abstract class Proxy {
* @param mixed $value
*/
public function writeToCache($key, $value) {
- if($this->cache === null) {
+ if ($this->cache === null) {
return;
}
$key = $this->getCacheKey($key);
@@ -199,7 +199,7 @@ abstract class Proxy {
}
public function clearCache() {
- if($this->cache === null) {
+ if ($this->cache === null) {
return;
}
$this->cache->clear($this->getCacheKey(null));