@@ -67,7 +67,7 @@ |
||
| 67 | 67 | * compared with \OC\Group\Backend::CREATE_GROUP etc. |
| 68 | 68 | */ |
| 69 | 69 | public function implementsActions($actions) { |
| 70 | - return (bool)($this->getSupportedActions() & $actions); |
|
| 70 | + return (bool) ($this->getSupportedActions() & $actions); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | /** |
@@ -133,10 +133,10 @@ discard block |
||
| 133 | 133 | |
| 134 | 134 | // Check that all parameters from $event exist in $previousEvent |
| 135 | 135 | foreach ($params1 as $key => $parameter) { |
| 136 | - if (preg_match('/^' . $mergeParameter . '(\d+)?$/', $key)) { |
|
| 136 | + if (preg_match('/^'.$mergeParameter.'(\d+)?$/', $key)) { |
|
| 137 | 137 | if (!$this->checkParameterAlreadyExits($params, $mergeParameter, $parameter)) { |
| 138 | 138 | $combined++; |
| 139 | - $params[$mergeParameter . $combined] = $parameter; |
|
| 139 | + $params[$mergeParameter.$combined] = $parameter; |
|
| 140 | 140 | } |
| 141 | 141 | continue; |
| 142 | 142 | } |
@@ -151,10 +151,10 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | // Check that all parameters from $previousEvent exist in $event |
| 153 | 153 | foreach ($params2 as $key => $parameter) { |
| 154 | - if (preg_match('/^' . $mergeParameter . '(\d+)?$/', $key)) { |
|
| 154 | + if (preg_match('/^'.$mergeParameter.'(\d+)?$/', $key)) { |
|
| 155 | 155 | if (!$this->checkParameterAlreadyExits($params, $mergeParameter, $parameter)) { |
| 156 | 156 | $combined++; |
| 157 | - $params[$mergeParameter . $combined] = $parameter; |
|
| 157 | + $params[$mergeParameter.$combined] = $parameter; |
|
| 158 | 158 | } |
| 159 | 159 | continue; |
| 160 | 160 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | */ |
| 179 | 179 | protected function checkParameterAlreadyExits($parameters, $mergeParameter, $parameter) { |
| 180 | 180 | foreach ($parameters as $key => $param) { |
| 181 | - if (preg_match('/^' . $mergeParameter . '(\d+)?$/', $key)) { |
|
| 181 | + if (preg_match('/^'.$mergeParameter.'(\d+)?$/', $key)) { |
|
| 182 | 182 | if ($param === $parameter) { |
| 183 | 183 | return true; |
| 184 | 184 | } |
@@ -196,30 +196,30 @@ discard block |
||
| 196 | 196 | protected function getExtendedSubject($subject, $parameter, $counter) { |
| 197 | 197 | switch ($counter) { |
| 198 | 198 | case 1: |
| 199 | - $replacement = '{' . $parameter . '1}'; |
|
| 199 | + $replacement = '{'.$parameter.'1}'; |
|
| 200 | 200 | break; |
| 201 | 201 | case 2: |
| 202 | 202 | $replacement = $this->l10n->t( |
| 203 | 203 | '%1$s and %2$s', |
| 204 | - ['{' . $parameter . '2}', '{' . $parameter . '1}'] |
|
| 204 | + ['{'.$parameter.'2}', '{'.$parameter.'1}'] |
|
| 205 | 205 | ); |
| 206 | 206 | break; |
| 207 | 207 | case 3: |
| 208 | 208 | $replacement = $this->l10n->t( |
| 209 | 209 | '%1$s, %2$s and %3$s', |
| 210 | - ['{' . $parameter . '3}', '{' . $parameter . '2}', '{' . $parameter . '1}'] |
|
| 210 | + ['{'.$parameter.'3}', '{'.$parameter.'2}', '{'.$parameter.'1}'] |
|
| 211 | 211 | ); |
| 212 | 212 | break; |
| 213 | 213 | case 4: |
| 214 | 214 | $replacement = $this->l10n->t( |
| 215 | 215 | '%1$s, %2$s, %3$s and %4$s', |
| 216 | - ['{' . $parameter . '4}', '{' . $parameter . '3}', '{' . $parameter . '2}', '{' . $parameter . '1}'] |
|
| 216 | + ['{'.$parameter.'4}', '{'.$parameter.'3}', '{'.$parameter.'2}', '{'.$parameter.'1}'] |
|
| 217 | 217 | ); |
| 218 | 218 | break; |
| 219 | 219 | case 5: |
| 220 | 220 | $replacement = $this->l10n->t( |
| 221 | 221 | '%1$s, %2$s, %3$s, %4$s and %5$s', |
| 222 | - ['{' . $parameter . '5}', '{' . $parameter . '4}', '{' . $parameter . '3}', '{' . $parameter . '2}', '{' . $parameter . '1}'] |
|
| 222 | + ['{'.$parameter.'5}', '{'.$parameter.'4}', '{'.$parameter.'3}', '{'.$parameter.'2}', '{'.$parameter.'1}'] |
|
| 223 | 223 | ); |
| 224 | 224 | break; |
| 225 | 225 | default: |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | } |
| 228 | 228 | |
| 229 | 229 | return str_replace( |
| 230 | - '{' . $parameter . '}', |
|
| 230 | + '{'.$parameter.'}', |
|
| 231 | 231 | $replacement, |
| 232 | 232 | $subject |
| 233 | 233 | ); |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | protected function generateParsedSubject($subject, $parameters) { |
| 242 | 242 | $placeholders = $replacements = []; |
| 243 | 243 | foreach ($parameters as $placeholder => $parameter) { |
| 244 | - $placeholders[] = '{' . $placeholder . '}'; |
|
| 244 | + $placeholders[] = '{'.$placeholder.'}'; |
|
| 245 | 245 | if ($parameter['type'] === 'file') { |
| 246 | 246 | $replacements[] = trim($parameter['path'], '/'); |
| 247 | 247 | } elseif (isset($parameter['name'])) { |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | * @return IEntry[] |
| 90 | 90 | */ |
| 91 | 91 | private function sortEntries(array $entries) { |
| 92 | - usort($entries, function (IEntry $entryA, IEntry $entryB) { |
|
| 92 | + usort($entries, function(IEntry $entryA, IEntry $entryB) { |
|
| 93 | 93 | return strcasecmp($entryA->getFullName(), $entryB->getFullName()); |
| 94 | 94 | }); |
| 95 | 95 | return $entries; |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * sort the actions by priority and name |
| 116 | 116 | */ |
| 117 | 117 | private function sortActions() { |
| 118 | - usort($this->actions, function (IAction $action1, IAction $action2) { |
|
| 118 | + usort($this->actions, function(IAction $action1, IAction $action2) { |
|
| 119 | 119 | $prio1 = $action1->getPriority(); |
| 120 | 120 | $prio2 = $action2->getPriority(); |
| 121 | 121 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | public function jsonSerialize() { |
| 154 | 154 | $topAction = !empty($this->actions) ? $this->actions[0]->jsonSerialize() : null; |
| 155 | - $otherActions = array_map(function (IAction $action) { |
|
| 155 | + $otherActions = array_map(function(IAction $action) { |
|
| 156 | 156 | return $action->jsonSerialize(); |
| 157 | 157 | }, array_slice($this->actions, 1)); |
| 158 | 158 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * @return string[] |
| 96 | 96 | */ |
| 97 | 97 | private function getAppProviderClasses(IUser $user) { |
| 98 | - return array_reduce($this->appManager->getEnabledAppsForUser($user), function ($all, $appId) { |
|
| 98 | + return array_reduce($this->appManager->getEnabledAppsForUser($user), function($all, $appId) { |
|
| 99 | 99 | $info = $this->appManager->getAppInfo($appId); |
| 100 | 100 | |
| 101 | 101 | if (!isset($info['contactsmenu']) || !isset($info['contactsmenu'])) { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | return $all; |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - $providers = array_reduce($info['contactsmenu'], function ($all, $provider) { |
|
| 106 | + $providers = array_reduce($info['contactsmenu'], function($all, $provider) { |
|
| 107 | 107 | return array_merge($all, [$provider]); |
| 108 | 108 | }, []); |
| 109 | 109 | |
@@ -77,20 +77,20 @@ |
||
| 77 | 77 | |
| 78 | 78 | // missing translations files fill be ignored |
| 79 | 79 | if (strpos($script, 'l10n/') === 0) { |
| 80 | - $this->appendIfExist($app_path, $script . '.js', $app_url); |
|
| 80 | + $this->appendIfExist($app_path, $script.'.js', $app_url); |
|
| 81 | 81 | return; |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | if ($app_path === false && $app_url === false) { |
| 85 | 85 | $this->logger->error('Could not find resource {resource} to load', [ |
| 86 | - 'resource' => $app . '/' . $script . '.js', |
|
| 86 | + 'resource' => $app.'/'.$script.'.js', |
|
| 87 | 87 | 'app' => 'jsresourceloader', |
| 88 | 88 | ]); |
| 89 | 89 | return; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | if (!$this->cacheAndAppendCombineJsonIfExist($app_path, $script.'.json', $app)) { |
| 93 | - $this->append($app_path, $script . '.js', $app_url); |
|
| 93 | + $this->append($app_path, $script.'.js', $app_url); |
|
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | |
| 66 | 66 | if ($app_path === false && $app_url === false) { |
| 67 | 67 | $this->logger->error('Could not find resource {resource} to load', [ |
| 68 | - 'resource' => $app . '/' . $style . '.css', |
|
| 68 | + 'resource' => $app.'/'.$style.'.css', |
|
| 69 | 69 | 'app' => 'cssresourceloader', |
| 70 | 70 | ]); |
| 71 | 71 | return; |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $this->doFind($resource); |
| 76 | 76 | } catch (ResourceNotFoundException $e) { |
| 77 | 77 | $resourceApp = substr($resource, 0, strpos($resource, '/')); |
| 78 | - $this->logger->debug('Could not find resource file "' . $e->getResourcePath() . '"', ['app' => $resourceApp]); |
|
| 78 | + $this->logger->debug('Could not find resource file "'.$e->getResourcePath().'"', ['app' => $resourceApp]); |
|
| 79 | 79 | } |
| 80 | 80 | } |
| 81 | 81 | if (!empty($this->theme)) { |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $this->doFindTheme($resource); |
| 85 | 85 | } catch (ResourceNotFoundException $e) { |
| 86 | 86 | $resourceApp = substr($resource, 0, strpos($resource, '/')); |
| 87 | - $this->logger->debug('Could not find resource file in theme "' . $e->getResourcePath() . '"', ['app' => $resourceApp]); |
|
| 87 | + $this->logger->debug('Could not find resource file in theme "'.$e->getResourcePath().'"', ['app' => $resourceApp]); |
|
| 88 | 88 | } |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | } |
| 159 | 159 | $this->resources[] = [$root, $webRoot, $file]; |
| 160 | 160 | |
| 161 | - if ($throw && !is_file($root . '/' . $file)) { |
|
| 161 | + if ($throw && !is_file($root.'/'.$file)) { |
|
| 162 | 162 | throw new ResourceNotFoundException($file, $webRoot); |
| 163 | 163 | } |
| 164 | 164 | } |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | if (array_key_exists($key, $this->vars)) { |
| 118 | 118 | $this->vars[$key][] = $value; |
| 119 | 119 | } else { |
| 120 | - $this->vars[$key] = [ $value ]; |
|
| 120 | + $this->vars[$key] = [$value]; |
|
| 121 | 121 | } |
| 122 | 122 | } |
| 123 | 123 | |