@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | 'length' => 11, |
| 60 | 60 | 'unsigned' => true, |
| 61 | 61 | ]); |
| 62 | - $table->addColumn($type . '_id', Types::BIGINT, [ |
|
| 62 | + $table->addColumn($type.'_id', Types::BIGINT, [ |
|
| 63 | 63 | 'notnull' => true, |
| 64 | 64 | 'length' => 11, |
| 65 | 65 | 'unsigned' => true, |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | ]); |
| 75 | 75 | |
| 76 | 76 | $table->setPrimaryKey(['id']); |
| 77 | - $table->addIndex([$type . '_id', 'key'], $this->getMetadataTableName($type) . '_idk'); |
|
| 77 | + $table->addIndex([$type.'_id', 'key'], $this->getMetadataTableName($type).'_idk'); |
|
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | |
@@ -86,6 +86,6 @@ discard block |
||
| 86 | 86 | * @return string |
| 87 | 87 | */ |
| 88 | 88 | private function getMetadataTableName(string $type):string { |
| 89 | - return 'calendar_' . $type . 's_md'; |
|
| 89 | + return 'calendar_'.$type.'s_md'; |
|
| 90 | 90 | } |
| 91 | 91 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | public function injectFn(callable $fn) { |
| 45 | 45 | $reflected = new ReflectionFunction(Closure::fromCallable($fn)); |
| 46 | - return $fn(...array_map(function (ReflectionParameter $param) { |
|
| 46 | + return $fn(...array_map(function(ReflectionParameter $param) { |
|
| 47 | 47 | // First we try by type (more likely these days) |
| 48 | 48 | if (($type = $param->getType()) !== null) { |
| 49 | 49 | try { |
@@ -60,11 +60,11 @@ |
||
| 60 | 60 | if ($readablePath) { |
| 61 | 61 | $message = "\"$path\"(\"$readablePath\") is locked"; |
| 62 | 62 | } else { |
| 63 | - $message = '"' . $path . '" is locked'; |
|
| 63 | + $message = '"'.$path.'" is locked'; |
|
| 64 | 64 | } |
| 65 | 65 | $this->existingLock = $existingLock; |
| 66 | 66 | if ($existingLock) { |
| 67 | - $message .= ', existing lock on file: ' . $existingLock; |
|
| 67 | + $message .= ', existing lock on file: '.$existingLock; |
|
| 68 | 68 | } |
| 69 | 69 | parent::__construct($message, 0, $previous); |
| 70 | 70 | $this->path = $path; |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | if (isset($this->namespaces[$namespace])) { |
| 105 | 105 | if (!isset($this->hasNoAppContainer[$namespace])) { |
| 106 | - $applicationClassName = 'OCA\\' . $sensitiveNamespace . '\\AppInfo\\Application'; |
|
| 106 | + $applicationClassName = 'OCA\\'.$sensitiveNamespace.'\\AppInfo\\Application'; |
|
| 107 | 107 | if (class_exists($applicationClassName)) { |
| 108 | 108 | $app = new $applicationClassName(); |
| 109 | 109 | if (isset($this->appContainers[$namespace])) { |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | try { |
| 162 | - [,$namespace,] = explode('\\', $id); |
|
| 162 | + [,$namespace, ] = explode('\\', $id); |
|
| 163 | 163 | return $this->getAppContainer(strtolower($namespace), $namespace); |
| 164 | 164 | } catch (QueryException $e) { |
| 165 | 165 | return null; |
@@ -6,5 +6,5 @@ |
||
| 6 | 6 | $baseDir = $vendorDir; |
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | - 'OCA\\UserStatus\\' => array($baseDir . '/../lib'), |
|
| 9 | + 'OCA\\UserStatus\\' => array($baseDir.'/../lib'), |
|
| 10 | 10 | ); |
@@ -370,18 +370,18 @@ discard block |
||
| 370 | 370 | private function findFileWithExtension($class, $ext) |
| 371 | 371 | { |
| 372 | 372 | // PSR-4 lookup |
| 373 | - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; |
|
| 373 | + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext; |
|
| 374 | 374 | |
| 375 | 375 | $first = $class[0]; |
| 376 | 376 | if (isset($this->prefixLengthsPsr4[$first])) { |
| 377 | 377 | $subPath = $class; |
| 378 | 378 | while (false !== $lastPos = strrpos($subPath, '\\')) { |
| 379 | 379 | $subPath = substr($subPath, 0, $lastPos); |
| 380 | - $search = $subPath . '\\'; |
|
| 380 | + $search = $subPath.'\\'; |
|
| 381 | 381 | if (isset($this->prefixDirsPsr4[$search])) { |
| 382 | - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); |
|
| 382 | + $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1); |
|
| 383 | 383 | foreach ($this->prefixDirsPsr4[$search] as $dir) { |
| 384 | - if (file_exists($file = $dir . $pathEnd)) { |
|
| 384 | + if (file_exists($file = $dir.$pathEnd)) { |
|
| 385 | 385 | return $file; |
| 386 | 386 | } |
| 387 | 387 | } |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | |
| 392 | 392 | // PSR-4 fallback dirs |
| 393 | 393 | foreach ($this->fallbackDirsPsr4 as $dir) { |
| 394 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { |
|
| 394 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { |
|
| 395 | 395 | return $file; |
| 396 | 396 | } |
| 397 | 397 | } |
@@ -403,14 +403,14 @@ discard block |
||
| 403 | 403 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); |
| 404 | 404 | } else { |
| 405 | 405 | // PEAR-like class name |
| 406 | - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; |
|
| 406 | + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext; |
|
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | if (isset($this->prefixesPsr0[$first])) { |
| 410 | 410 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { |
| 411 | 411 | if (0 === strpos($class, $prefix)) { |
| 412 | 412 | foreach ($dirs as $dir) { |
| 413 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
| 413 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
| 414 | 414 | return $file; |
| 415 | 415 | } |
| 416 | 416 | } |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | |
| 421 | 421 | // PSR-0 fallback dirs |
| 422 | 422 | foreach ($this->fallbackDirsPsr0 as $dir) { |
| 423 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
| 423 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
| 424 | 424 | return $file; |
| 425 | 425 | } |
| 426 | 426 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * @return string|null |
| 86 | 86 | * @since 20.0.0 |
| 87 | 87 | */ |
| 88 | - public function getMessage():?string; |
|
| 88 | + public function getMessage(): ?string; |
|
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | 91 | * Get a custom icon provided by the user |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | * @return string|null |
| 94 | 94 | * @since 20.0.0 |
| 95 | 95 | */ |
| 96 | - public function getIcon():?string; |
|
| 96 | + public function getIcon(): ?string; |
|
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | 99 | * Gets the time that the custom status will be cleared at |
@@ -101,5 +101,5 @@ discard block |
||
| 101 | 101 | * @return DateTimeImmutable|null |
| 102 | 102 | * @since 20.0.0 |
| 103 | 103 | */ |
| 104 | - public function getClearAt():?DateTimeImmutable; |
|
| 104 | + public function getClearAt(): ?DateTimeImmutable; |
|
| 105 | 105 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | $result = []; |
| 117 | 117 | foreach ($storagesByMountpoint as $storageList) { |
| 118 | - $storage = array_reduce($storageList, function ($carry, $item) { |
|
| 118 | + $storage = array_reduce($storageList, function($carry, $item) { |
|
| 119 | 119 | if (isset($carry)) { |
| 120 | 120 | $carryPriorityType = $this->getPriorityType($carry); |
| 121 | 121 | $itemPriorityType = $this->getPriorityType($item); |
@@ -191,11 +191,11 @@ discard block |
||
| 191 | 191 | $groupIds = $this->groupManager->getUserGroupIds($user); |
| 192 | 192 | $mounts = $this->dbConfig->getMountsForUser($user->getUID(), $groupIds); |
| 193 | 193 | $configs = array_map([$this, 'getStorageConfigFromDBMount'], $mounts); |
| 194 | - $configs = array_filter($configs, function ($config) { |
|
| 194 | + $configs = array_filter($configs, function($config) { |
|
| 195 | 195 | return $config instanceof StorageConfig; |
| 196 | 196 | }); |
| 197 | 197 | |
| 198 | - $keys = array_map(function (StorageConfig $config) { |
|
| 198 | + $keys = array_map(function(StorageConfig $config) { |
|
| 199 | 199 | return $config->getId(); |
| 200 | 200 | }, $configs); |
| 201 | 201 | |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | $jsTrans = []; |
| 107 | 107 | foreach ($translations as $id => $val) { |
| 108 | 108 | if (is_array($val)) { |
| 109 | - $val = '[ ' . implode(',', $val) . ']'; |
|
| 109 | + $val = '[ '.implode(',', $val).']'; |
|
| 110 | 110 | } |
| 111 | 111 | $jsTrans[] = "\"$id\" : \"$val\""; |
| 112 | 112 | } |