@@ -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 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @param callable $callback |
36 | 36 | */ |
37 | 37 | public function listen($scope, $method, callable $callback) { |
38 | - $eventName = $scope . '::' . $method; |
|
38 | + $eventName = $scope.'::'.$method; |
|
39 | 39 | if (!isset($this->listeners[$eventName])) { |
40 | 40 | $this->listeners[$eventName] = []; |
41 | 41 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $names = []; |
54 | 54 | $allNames = array_keys($this->listeners); |
55 | 55 | if ($scope and $method) { |
56 | - $name = $scope . '::' . $method; |
|
56 | + $name = $scope.'::'.$method; |
|
57 | 57 | if (isset($this->listeners[$name])) { |
58 | 58 | $names[] = $name; |
59 | 59 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * @param array $arguments optional |
94 | 94 | */ |
95 | 95 | protected function emit($scope, $method, array $arguments = []) { |
96 | - $eventName = $scope . '::' . $method; |
|
96 | + $eventName = $scope.'::'.$method; |
|
97 | 97 | if (isset($this->listeners[$eventName])) { |
98 | 98 | foreach ($this->listeners[$eventName] as $callback) { |
99 | 99 | call_user_func_array($callback, $arguments); |
@@ -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 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | // always add owner to the list of users with access to the file |
74 | 74 | $userIds = [$owner]; |
75 | 75 | |
76 | - if (!$this->util->isFile($owner . '/' . $ownerPath)) { |
|
76 | + if (!$this->util->isFile($owner.'/'.$ownerPath)) { |
|
77 | 77 | return ['users' => $userIds, 'public' => false]; |
78 | 78 | } |
79 | 79 |
@@ -77,7 +77,7 @@ |
||
77 | 77 | $path = array_pop($path); |
78 | 78 | |
79 | 79 | $newName = \OC_Helper::buildNotExistingFileNameForView('/', $path, $this->view); |
80 | - $url = $request->getBaseUrl() . $newName; |
|
80 | + $url = $request->getBaseUrl().$newName; |
|
81 | 81 | $request->setUrl($url); |
82 | 82 | } |
83 | 83 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $output->writeln('Syncing users ...'); |
55 | 55 | $progress = new ProgressBar($output); |
56 | 56 | $progress->start(); |
57 | - $this->syncService->syncInstance(function () use ($progress) { |
|
57 | + $this->syncService->syncInstance(function() use ($progress) { |
|
58 | 58 | $progress->advance(); |
59 | 59 | }); |
60 | 60 |
@@ -71,7 +71,7 @@ |
||
71 | 71 | return true; |
72 | 72 | } |
73 | 73 | |
74 | - $size = isset($queryParams['size']) ? (int)$queryParams['size'] : -1; |
|
74 | + $size = isset($queryParams['size']) ? (int) $queryParams['size'] : -1; |
|
75 | 75 | |
76 | 76 | $path = $request->getPath(); |
77 | 77 | $node = $this->server->tree->getNodeForPath($path); |
@@ -94,15 +94,15 @@ discard block |
||
94 | 94 | $tags = $this->tagManager->getTagsByIds([$tagId]); |
95 | 95 | $tag = current($tags); |
96 | 96 | if (!$this->tagManager->canUserSeeTag($tag, $this->user)) { |
97 | - throw new PreconditionFailed('Tag with id ' . $tagId . ' does not exist, cannot assign'); |
|
97 | + throw new PreconditionFailed('Tag with id '.$tagId.' does not exist, cannot assign'); |
|
98 | 98 | } |
99 | 99 | if (!$this->tagManager->canUserAssignTag($tag, $this->user)) { |
100 | - throw new Forbidden('No permission to assign tag ' . $tagId); |
|
100 | + throw new Forbidden('No permission to assign tag '.$tagId); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | $this->tagMapper->assignTags($this->objectId, $this->objectType, $tagId); |
104 | 104 | } catch (TagNotFoundException $e) { |
105 | - throw new PreconditionFailed('Tag with id ' . $tagId . ' does not exist, cannot assign'); |
|
105 | + throw new PreconditionFailed('Tag with id '.$tagId.' does not exist, cannot assign'); |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | return $this->makeNode($tag); |
120 | 120 | } |
121 | 121 | } |
122 | - throw new NotFound('Tag with id ' . $tagId . ' not present for object ' . $this->objectId); |
|
122 | + throw new NotFound('Tag with id '.$tagId.' not present for object '.$this->objectId); |
|
123 | 123 | } catch (\InvalidArgumentException $e) { |
124 | 124 | throw new BadRequest('Invalid tag id', 0, $e); |
125 | 125 | } catch (TagNotFoundException $e) { |
126 | - throw new NotFound('Tag with id ' . $tagId . ' not found', 0, $e); |
|
126 | + throw new NotFound('Tag with id '.$tagId.' not found', 0, $e); |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
@@ -135,11 +135,11 @@ discard block |
||
135 | 135 | $tags = $this->tagManager->getTagsByIds($tagIds); |
136 | 136 | |
137 | 137 | // filter out non-visible tags |
138 | - $tags = array_filter($tags, function ($tag) { |
|
138 | + $tags = array_filter($tags, function($tag) { |
|
139 | 139 | return $this->tagManager->canUserSeeTag($tag, $this->user); |
140 | 140 | }); |
141 | 141 | |
142 | - return array_values(array_map(function ($tag) { |
|
142 | + return array_values(array_map(function($tag) { |
|
143 | 143 | return $this->makeNode($tag); |
144 | 144 | }, $tags)); |
145 | 145 | } |
@@ -104,13 +104,13 @@ discard block |
||
104 | 104 | $tag = $this->tagManager->getTagsByIds([$name]); |
105 | 105 | $tag = current($tag); |
106 | 106 | if (!$this->tagManager->canUserSeeTag($tag, $this->userSession->getUser())) { |
107 | - throw new NotFound('Tag with id ' . $name . ' not found'); |
|
107 | + throw new NotFound('Tag with id '.$name.' not found'); |
|
108 | 108 | } |
109 | 109 | return $this->makeNode($tag); |
110 | 110 | } catch (\InvalidArgumentException $e) { |
111 | 111 | throw new BadRequest('Invalid tag id', 0, $e); |
112 | 112 | } catch (TagNotFoundException $e) { |
113 | - throw new NotFound('Tag with id ' . $name . ' not found', 0, $e); |
|
113 | + throw new NotFound('Tag with id '.$name.' not found', 0, $e); |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | $tags = $this->tagManager->getAllTags($visibilityFilter); |
124 | - return array_map(function ($tag) { |
|
124 | + return array_map(function($tag) { |
|
125 | 125 | return $this->makeNode($tag); |
126 | 126 | }, $tags); |
127 | 127 | } |