@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | return; |
174 | 174 | } |
175 | 175 | |
176 | - $this->dispatcher->dispatch(IGroup::class . '::preAddUser', new GenericEvent($this, [ |
|
176 | + $this->dispatcher->dispatch(IGroup::class.'::preAddUser', new GenericEvent($this, [ |
|
177 | 177 | 'user' => $user, |
178 | 178 | ])); |
179 | 179 | |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $this->users[$user->getUID()] = $user; |
188 | 188 | } |
189 | 189 | |
190 | - $this->dispatcher->dispatch(IGroup::class . '::postAddUser', new GenericEvent($this, [ |
|
190 | + $this->dispatcher->dispatch(IGroup::class.'::postAddUser', new GenericEvent($this, [ |
|
191 | 191 | 'user' => $user, |
192 | 192 | ])); |
193 | 193 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | */ |
207 | 207 | public function removeUser($user) { |
208 | 208 | $result = false; |
209 | - $this->dispatcher->dispatch(IGroup::class . '::preRemoveUser', new GenericEvent($this, [ |
|
209 | + $this->dispatcher->dispatch(IGroup::class.'::preRemoveUser', new GenericEvent($this, [ |
|
210 | 210 | 'user' => $user, |
211 | 211 | ])); |
212 | 212 | if ($this->emitter) { |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | } |
220 | 220 | } |
221 | 221 | if ($result) { |
222 | - $this->dispatcher->dispatch(IGroup::class . '::postRemoveUser', new GenericEvent($this, [ |
|
222 | + $this->dispatcher->dispatch(IGroup::class.'::postRemoveUser', new GenericEvent($this, [ |
|
223 | 223 | 'user' => $user, |
224 | 224 | ])); |
225 | 225 | if ($this->emitter) { |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } |
330 | 330 | |
331 | 331 | $result = false; |
332 | - $this->dispatcher->dispatch(IGroup::class . '::preDelete', new GenericEvent($this)); |
|
332 | + $this->dispatcher->dispatch(IGroup::class.'::preDelete', new GenericEvent($this)); |
|
333 | 333 | if ($this->emitter) { |
334 | 334 | $this->emitter->emit('\OC\Group', 'preDelete', [$this]); |
335 | 335 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | } |
341 | 341 | } |
342 | 342 | if ($result) { |
343 | - $this->dispatcher->dispatch(IGroup::class . '::postDelete', new GenericEvent($this)); |
|
343 | + $this->dispatcher->dispatch(IGroup::class.'::postDelete', new GenericEvent($this)); |
|
344 | 344 | if ($this->emitter) { |
345 | 345 | $this->emitter->emit('\OC\Group', 'postDelete', [$this]); |
346 | 346 | } |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | * @since 16.0.0 |
399 | 399 | */ |
400 | 400 | public function hideFromCollaboration(): bool { |
401 | - return array_reduce($this->backends, function (bool $hide, GroupInterface $backend) { |
|
401 | + return array_reduce($this->backends, function(bool $hide, GroupInterface $backend) { |
|
402 | 402 | return $hide | ($backend instanceof IHideFromCollaborationBackend && $backend->hideGroup($this->gid)); |
403 | 403 | }, false); |
404 | 404 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | $subQuery = $this->connection->getQueryBuilder(); |
114 | 114 | $subQuery->select('s1.id') |
115 | - ->from($subQuery->createFunction('(' . $subSubQuery->getSQL() . ')'), 's1') |
|
115 | + ->from($subQuery->createFunction('('.$subSubQuery->getSQL().')'), 's1') |
|
116 | 116 | ->join( |
117 | 117 | 's1', 'share', 's2', |
118 | 118 | $subQuery->expr()->eq('s1.parent', 's2.id') |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $query = $this->connection->getQueryBuilder(); |
127 | 127 | $query->select($query->func()->count('*', 'total')) |
128 | 128 | ->from('share') |
129 | - ->where($query->expr()->in('id', $query->createFunction('(' . $subQuery->getSQL() . ')'))); |
|
129 | + ->where($query->expr()->in('id', $query->createFunction('('.$subQuery->getSQL().')'))); |
|
130 | 130 | |
131 | 131 | $result = $query->execute(); |
132 | 132 | $data = $result->fetch(); |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | $query = $this->connection->getQueryBuilder(); |
151 | 151 | $query->select('s1.id', 's1.uid_owner', 's1.uid_initiator') |
152 | - ->from($query->createFunction('(' . $subQuery->getSQL() . ')'), 's1') |
|
152 | + ->from($query->createFunction('('.$subQuery->getSQL().')'), 's1') |
|
153 | 153 | ->join( |
154 | 154 | 's1', 'share', 's2', |
155 | 155 | $query->expr()->eq('s1.parent', 's2.id') |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | $this->addToNotify($data['uid_owner']); |
174 | 174 | $this->addToNotify($data['uid_initiator']); |
175 | 175 | |
176 | - $this->deleteShare((int)$id); |
|
176 | + $this->deleteShare((int) $id); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | class Streamer { |
41 | 41 | // array of regexp. Matching user agents will get tar instead of zip |
42 | - private $preferTarFor = [ '/macintosh|mac os x/i' ]; |
|
42 | + private $preferTarFor = ['/macintosh|mac os x/i']; |
|
43 | 43 | |
44 | 44 | // streamer instance |
45 | 45 | private $streamerInstance; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function sendHeaders($name) { |
93 | 93 | $extension = $this->streamerInstance instanceof ZipStreamer ? '.zip' : '.tar'; |
94 | - $fullName = $name . $extension; |
|
94 | + $fullName = $name.$extension; |
|
95 | 95 | $this->streamerInstance->sendHeaders($fullName); |
96 | 96 | } |
97 | 97 | |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function addDirRecursive(string $dir, string $internalDir = ''): void { |
106 | 106 | $dirname = basename($dir); |
107 | - $rootDir = $internalDir . $dirname; |
|
107 | + $rootDir = $internalDir.$dirname; |
|
108 | 108 | if (!empty($rootDir)) { |
109 | 109 | $this->streamerInstance->addEmptyDir($rootDir); |
110 | 110 | } |
111 | - $internalDir .= $dirname . '/'; |
|
111 | + $internalDir .= $dirname.'/'; |
|
112 | 112 | // prevent absolute dirs |
113 | 113 | $internalDir = ltrim($internalDir, '/'); |
114 | 114 | |
@@ -126,14 +126,14 @@ discard block |
||
126 | 126 | } |
127 | 127 | $this->addFileFromStream( |
128 | 128 | $fh, |
129 | - $internalDir . $file->getName(), |
|
129 | + $internalDir.$file->getName(), |
|
130 | 130 | $file->getSize(), |
131 | 131 | $file->getMTime() |
132 | 132 | ); |
133 | 133 | fclose($fh); |
134 | 134 | } elseif ($file instanceof Folder) { |
135 | 135 | if ($file->isReadable()) { |
136 | - $this->addDirRecursive($dir . '/' . $file->getName(), $internalDir); |
|
136 | + $this->addDirRecursive($dir.'/'.$file->getName(), $internalDir); |
|
137 | 137 | } |
138 | 138 | } |
139 | 139 | } |
@@ -40,10 +40,10 @@ discard block |
||
40 | 40 | \OC\AppFramework\Http\Request::USER_AGENT_ANDROID_MOBILE_CHROME, |
41 | 41 | \OC\AppFramework\Http\Request::USER_AGENT_FREEBOX, |
42 | 42 | ])) { |
43 | - header('Content-Disposition: ' . rawurlencode($type) . '; filename="' . rawurlencode($filename) . '"'); |
|
43 | + header('Content-Disposition: '.rawurlencode($type).'; filename="'.rawurlencode($filename).'"'); |
|
44 | 44 | } else { |
45 | - header('Content-Disposition: ' . rawurlencode($type) . '; filename*=UTF-8\'\'' . rawurlencode($filename) |
|
46 | - . '; filename="' . rawurlencode($filename) . '"'); |
|
45 | + header('Content-Disposition: '.rawurlencode($type).'; filename*=UTF-8\'\''.rawurlencode($filename) |
|
46 | + . '; filename="'.rawurlencode($filename).'"'); |
|
47 | 47 | } |
48 | 48 | } |
49 | 49 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | . 'connect-src *; ' |
91 | 91 | . 'object-src \'none\'; ' |
92 | 92 | . 'base-uri \'self\'; '; |
93 | - header('Content-Security-Policy:' . $policy); |
|
93 | + header('Content-Security-Policy:'.$policy); |
|
94 | 94 | |
95 | 95 | // Send fallback headers for installations that don't have the possibility to send |
96 | 96 | // custom headers on the webserver side |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | header('X-Accel-Buffering: no'); |
61 | 61 | $this->fallback = isset($_GET['fallback']) and $_GET['fallback'] == 'true'; |
62 | 62 | if ($this->fallback) { |
63 | - $this->fallBackId = (int)$_GET['fallback_id']; |
|
63 | + $this->fallBackId = (int) $_GET['fallback_id']; |
|
64 | 64 | /** |
65 | 65 | * FIXME: The default content-security-policy of ownCloud forbids inline |
66 | 66 | * JavaScript for security reasons. IE starting on Windows 10 will |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | */ |
74 | 74 | header("Content-Security-Policy: default-src 'none'; script-src 'unsafe-inline'"); |
75 | 75 | header("Content-Type: text/html"); |
76 | - echo str_repeat('<span></span>' . PHP_EOL, 10); //dummy data to keep IE happy |
|
76 | + echo str_repeat('<span></span>'.PHP_EOL, 10); //dummy data to keep IE happy |
|
77 | 77 | } else { |
78 | 78 | header("Content-Type: text/event-stream"); |
79 | 79 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | public function send($type, $data = null) { |
103 | 103 | if ($data and !preg_match('/^[A-Za-z0-9_]+$/', $type)) { |
104 | - throw new BadMethodCallException('Type needs to be alphanumeric ('. $type .')'); |
|
104 | + throw new BadMethodCallException('Type needs to be alphanumeric ('.$type.')'); |
|
105 | 105 | } |
106 | 106 | $this->init(); |
107 | 107 | if (is_null($data)) { |
@@ -110,13 +110,13 @@ discard block |
||
110 | 110 | } |
111 | 111 | if ($this->fallback) { |
112 | 112 | $response = '<script type="text/javascript">window.parent.OC.EventSource.fallBackCallBack(' |
113 | - . $this->fallBackId . ',"' . $type . '",' . OC_JSON::encode($data) . ')</script>' . PHP_EOL; |
|
113 | + . $this->fallBackId.',"'.$type.'",'.OC_JSON::encode($data).')</script>'.PHP_EOL; |
|
114 | 114 | echo $response; |
115 | 115 | } else { |
116 | 116 | if ($type) { |
117 | - echo 'event: ' . $type . PHP_EOL; |
|
117 | + echo 'event: '.$type.PHP_EOL; |
|
118 | 118 | } |
119 | - echo 'data: ' . OC_JSON::encode($data) . PHP_EOL; |
|
119 | + echo 'data: '.OC_JSON::encode($data).PHP_EOL; |
|
120 | 120 | } |
121 | 121 | echo PHP_EOL; |
122 | 122 | flush(); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | public static function checkAppEnabled($app) { |
45 | 45 | if (!\OC::$server->getAppManager()->isEnabledForUser($app)) { |
46 | 46 | $l = \OC::$server->getL10N('lib'); |
47 | - self::error([ 'data' => [ 'message' => $l->t('Application is not enabled'), 'error' => 'application_not_enabled' ]]); |
|
47 | + self::error(['data' => ['message' => $l->t('Application is not enabled'), 'error' => 'application_not_enabled']]); |
|
48 | 48 | exit(); |
49 | 49 | } |
50 | 50 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | || $twoFactorAuthManger->needsSecondFactor(\OC::$server->getUserSession()->getUser())) { |
61 | 61 | $l = \OC::$server->getL10N('lib'); |
62 | 62 | http_response_code(\OCP\AppFramework\Http::STATUS_UNAUTHORIZED); |
63 | - self::error([ 'data' => [ 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' ]]); |
|
63 | + self::error(['data' => ['message' => $l->t('Authentication error'), 'error' => 'authentication_error']]); |
|
64 | 64 | exit(); |
65 | 65 | } |
66 | 66 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | if (!\OC::$server->getRequest()->passesCSRFCheck()) { |
80 | 80 | $l = \OC::$server->getL10N('lib'); |
81 | - self::error([ 'data' => [ 'message' => $l->t('Token expired. Please reload page.'), 'error' => 'token_expired' ]]); |
|
81 | + self::error(['data' => ['message' => $l->t('Token expired. Please reload page.'), 'error' => 'token_expired']]); |
|
82 | 82 | exit(); |
83 | 83 | } |
84 | 84 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public static function checkAdminUser() { |
92 | 92 | if (!OC_User::isAdminUser(OC_User::getUser())) { |
93 | 93 | $l = \OC::$server->getL10N('lib'); |
94 | - self::error([ 'data' => [ 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' ]]); |
|
94 | + self::error(['data' => ['message' => $l->t('Authentication error'), 'error' => 'authentication_error']]); |
|
95 | 95 | exit(); |
96 | 96 | } |
97 | 97 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | protected static function to_string(&$value) { |
125 | 125 | if ($value instanceof \OC\L10N\L10NString) { |
126 | - $value = (string)$value; |
|
126 | + $value = (string) $value; |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $this->respondToActions |= $respondToActions; |
55 | 55 | |
56 | 56 | foreach ($this->which as $action => $v) { |
57 | - if ((bool)($respondToActions & $action)) { |
|
57 | + if ((bool) ($respondToActions & $action)) { |
|
58 | 58 | $this->which[$action] = $plugin; |
59 | 59 | \OC::$server->getLogger()->debug("Registered action ".$action." to plugin ".get_class($plugin), ['app' => 'user_ldap']); |
60 | 60 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $plugin = $this->which[GroupInterface::COUNT_USERS]; |
148 | 148 | |
149 | 149 | if ($plugin) { |
150 | - return $plugin->countUsersInGroup($gid,$search); |
|
150 | + return $plugin->countUsersInGroup($gid, $search); |
|
151 | 151 | } |
152 | 152 | throw new \Exception('No plugin implements countUsersInGroup in this LDAP Backend.'); |
153 | 153 | } |
@@ -114,7 +114,7 @@ |
||
114 | 114 | return; |
115 | 115 | } |
116 | 116 | $this->config->setUserValue($ocName, 'user_ldap', 'isDeleted', '1'); |
117 | - $this->config->setUserValue($ocName, 'user_ldap', 'foundDeleted', (string)time()); |
|
117 | + $this->config->setUserValue($ocName, 'user_ldap', 'foundDeleted', (string) time()); |
|
118 | 118 | $this->deletedUsers = null; |
119 | 119 | } |
120 | 120 | } |
@@ -292,7 +292,7 @@ |
||
292 | 292 | |
293 | 293 | $config = new Configuration($configID); |
294 | 294 | $data = $config->getConfiguration(); |
295 | - if (!(int)$showPassword) { |
|
295 | + if (!(int) $showPassword) { |
|
296 | 296 | $data['ldapAgentPassword'] = '***'; |
297 | 297 | } |
298 | 298 | foreach ($data as $key => $value) { |