@@ -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 |
@@ -66,12 +66,12 @@ discard block |
||
66 | 66 | */ |
67 | 67 | private function buildFileNameWithSuffix($absolutePath, $postFix = '') { |
68 | 68 | if ($postFix !== '') { |
69 | - $postFix = '.' . ltrim($postFix, '.'); |
|
69 | + $postFix = '.'.ltrim($postFix, '.'); |
|
70 | 70 | $postFix = str_replace(['\\', '/'], '', $postFix); |
71 | 71 | $absolutePath .= '-'; |
72 | 72 | } |
73 | 73 | |
74 | - return $absolutePath . $postFix; |
|
74 | + return $absolutePath.$postFix; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | $this->current[] = $uniqueFileName; |
128 | 128 | |
129 | 129 | // Build a name without postfix |
130 | - $path = $this->buildFileNameWithSuffix($uniqueFileName . '-folder', $postFix); |
|
130 | + $path = $this->buildFileNameWithSuffix($uniqueFileName.'-folder', $postFix); |
|
131 | 131 | mkdir($path, 0700); |
132 | 132 | $this->current[] = $path; |
133 | 133 | |
134 | - return $path . '/'; |
|
134 | + return $path.'/'; |
|
135 | 135 | } else { |
136 | 136 | $this->log->warning( |
137 | 137 | 'Can not create a temporary folder in directory {dir}. Check it exists and has correct permissions', |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | if ($dh) { |
191 | 191 | while (($file = readdir($dh)) !== false) { |
192 | 192 | if (substr($file, 0, 7) === self::TMP_PREFIX) { |
193 | - $path = $this->tmpBaseDir . '/' . $file; |
|
193 | + $path = $this->tmpBaseDir.'/'.$file; |
|
194 | 194 | $mtime = filemtime($path); |
195 | 195 | if ($mtime < $cutOfTime) { |
196 | 196 | $files[] = $path; |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | $owners = [$owners]; |
55 | 55 | } |
56 | 56 | |
57 | - $sql = 'SELECT `id`, `uid`, `type`, `category` FROM `' . $this->getTableName() . '` ' |
|
58 | - . 'WHERE `uid` IN (' . str_repeat('?,', count($owners) - 1) . '?) AND `type` = ? ORDER BY `category`'; |
|
57 | + $sql = 'SELECT `id`, `uid`, `type`, `category` FROM `'.$this->getTableName().'` ' |
|
58 | + . 'WHERE `uid` IN ('.str_repeat('?,', count($owners) - 1).'?) AND `type` = ? ORDER BY `category`'; |
|
59 | 59 | return $this->findEntities($sql, array_merge($owners, [$type])); |
60 | 60 | } |
61 | 61 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * @return bool |
67 | 67 | */ |
68 | 68 | public function tagExists($tag) { |
69 | - $sql = 'SELECT `id`, `uid`, `type`, `category` FROM `' . $this->getTableName() . '` ' |
|
69 | + $sql = 'SELECT `id`, `uid`, `type`, `category` FROM `'.$this->getTableName().'` ' |
|
70 | 70 | . 'WHERE `uid` = ? AND `type` = ? AND `category` = ?'; |
71 | 71 | try { |
72 | 72 | $this->findEntity($sql, [$tag->getOwner(), $tag->getType(), $tag->getName()]); |
@@ -70,8 +70,8 @@ |
||
70 | 70 | 'message' => $this->getOCSStatus() === 100 ? 'OK' : $this->statusMessage, |
71 | 71 | ]; |
72 | 72 | |
73 | - $meta['totalitems'] = $this->itemsCount !== null ? (string)$this->itemsCount : ''; |
|
74 | - $meta['itemsperpage'] = $this->itemsPerPage !== null ? (string)$this->itemsPerPage: ''; |
|
73 | + $meta['totalitems'] = $this->itemsCount !== null ? (string) $this->itemsCount : ''; |
|
74 | + $meta['itemsperpage'] = $this->itemsPerPage !== null ? (string) $this->itemsPerPage : ''; |
|
75 | 75 | |
76 | 76 | return $this->renderResult($meta); |
77 | 77 | } |
@@ -147,7 +147,7 @@ |
||
147 | 147 | if (isset($this->entityTypeCollections[$name])) { |
148 | 148 | return $this->entityTypeCollections[$name]; |
149 | 149 | } |
150 | - throw new NotFound('Entity type "' . $name . '" not found."'); |
|
150 | + throw new NotFound('Entity type "'.$name.'" not found."'); |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
@@ -68,7 +68,7 @@ |
||
68 | 68 | foreach (['id', 'name'] as $property) { |
69 | 69 | $$property = trim($$property); |
70 | 70 | if (empty($$property) || !is_string($$property)) { |
71 | - throw new \InvalidArgumentException('"' . $property . '" parameter must be non-empty string'); |
|
71 | + throw new \InvalidArgumentException('"'.$property.'" parameter must be non-empty string'); |
|
72 | 72 | } |
73 | 73 | } |
74 | 74 | $this->id = $id; |
@@ -85,14 +85,14 @@ discard block |
||
85 | 85 | $this->logger = $logger; |
86 | 86 | |
87 | 87 | $methods = get_class_methods($this->comment); |
88 | - $methods = array_filter($methods, function ($name) { |
|
88 | + $methods = array_filter($methods, function($name) { |
|
89 | 89 | return strpos($name, 'get') === 0; |
90 | 90 | }); |
91 | 91 | foreach ($methods as $getter) { |
92 | 92 | if ($getter === 'getMentions') { |
93 | - continue; // special treatment |
|
93 | + continue; // special treatment |
|
94 | 94 | } |
95 | - $name = '{'.self::NS_OWNCLOUD.'}' . lcfirst(substr($getter, 3)); |
|
95 | + $name = '{'.self::NS_OWNCLOUD.'}'.lcfirst(substr($getter, 3)); |
|
96 | 96 | $this->properties[$name] = $getter; |
97 | 97 | } |
98 | 98 | $this->userManager = $userManager; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $this->logger->logException($e, ['app' => 'dav/comments']); |
198 | 198 | if ($e instanceof MessageTooLongException) { |
199 | 199 | $msg = 'Message exceeds allowed character limit of '; |
200 | - throw new BadRequest($msg . IComment::MAX_MESSAGE_LENGTH, 0, $e); |
|
200 | + throw new BadRequest($msg.IComment::MAX_MESSAGE_LENGTH, 0, $e); |
|
201 | 201 | } |
202 | 202 | throw $e; |
203 | 203 | } |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | * @return array |
284 | 284 | */ |
285 | 285 | protected function composeMentionsPropertyValue() { |
286 | - return array_map(function ($mention) { |
|
286 | + return array_map(function($mention) { |
|
287 | 287 | try { |
288 | 288 | $displayName = $this->commentsManager->resolveDisplayName($mention['type'], $mention['id']); |
289 | 289 | } catch (\OutOfBoundsException $e) { |
@@ -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 |