@@ -40,5 +40,5 @@ |
||
| 40 | 40 | * @since 25.0.0 |
| 41 | 41 | * @since 27.0.0 return value may overflow from int to float |
| 42 | 42 | */ |
| 43 | - public function getEstimatedExportSize(IUser $user): int|float; |
|
| 43 | + public function getEstimatedExportSize(IUser $user): int | float; |
|
| 44 | 44 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | // Currently query has to have exactly one search condition. If no media type is provided, |
| 50 | 50 | // we fall back to the presence of a system tag. |
| 51 | 51 | if ($filteredMediaType !== '') { |
| 52 | - $mimeOperator = new SearchComparison(ISearchComparison::COMPARE_LIKE, 'mimetype', $filteredMediaType . '/%'); |
|
| 52 | + $mimeOperator = new SearchComparison(ISearchComparison::COMPARE_LIKE, 'mimetype', $filteredMediaType.'/%'); |
|
| 53 | 53 | $operator = new SearchBinaryOperator(ISearchBinaryOperator::OPERATOR_AND, [$operator, $mimeOperator]); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | if (!$e->isRetryable() || $i === ($maxRetries - 1)) { |
| 100 | 100 | throw $e; |
| 101 | 101 | } |
| 102 | - logger('core')->warning('Retrying operation after retryable exception.', [ 'exception' => $e ]); |
|
| 102 | + logger('core')->warning('Retrying operation after retryable exception.', ['exception' => $e]); |
|
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | } |
@@ -66,10 +66,10 @@ |
||
| 66 | 66 | return 1; |
| 67 | 67 | } |
| 68 | 68 | if (!isset($modules[$defaultModule])) { |
| 69 | - $output->writeln('<error>The current default module does not exist: ' . $defaultModule . '</error>'); |
|
| 69 | + $output->writeln('<error>The current default module does not exist: '.$defaultModule.'</error>'); |
|
| 70 | 70 | return 1; |
| 71 | 71 | } |
| 72 | - $output->writeln('Default module: ' . $defaultModule); |
|
| 72 | + $output->writeln('Default module: '.$defaultModule); |
|
| 73 | 73 | |
| 74 | 74 | return 0; |
| 75 | 75 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | if ($path === $root) { |
| 39 | 39 | return '/'; |
| 40 | - } elseif (!str_starts_with($path, $root . '/')) { |
|
| 40 | + } elseif (!str_starts_with($path, $root.'/')) { |
|
| 41 | 41 | return null; |
| 42 | 42 | } else { |
| 43 | 43 | $path = substr($path, strlen($root)); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $path = str_replace('\\', '/', $path); |
| 58 | 58 | //add leading slash |
| 59 | 59 | if ($path[0] !== '/') { |
| 60 | - $path = '/' . $path; |
|
| 60 | + $path = '/'.$path; |
|
| 61 | 61 | } |
| 62 | 62 | //remove duplicate slashes |
| 63 | 63 | while (str_contains($path, '//')) { |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | $offset += $batchSize; |
| 92 | 92 | } catch (\InvalidArgumentException $e) { |
| 93 | 93 | if (str_contains($e->getMessage(), 'Background job arguments can\'t exceed 4000')) { |
| 94 | - $batchSize = (int)floor(count($records) * 0.8); |
|
| 94 | + $batchSize = (int) floor(count($records) * 0.8); |
|
| 95 | 95 | $retry = true; |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | public function nlist(string $path) { |
| 111 | 111 | $files = @ftp_nlist($this->connection, $path); |
| 112 | - return array_map(function ($name) { |
|
| 112 | + return array_map(function($name) { |
|
| 113 | 113 | if (str_contains($name, '/')) { |
| 114 | 114 | $name = basename($name); |
| 115 | 115 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $files = @ftp_mlsd($this->connection, $path); |
| 122 | 122 | |
| 123 | 123 | if ($files !== false) { |
| 124 | - return array_map(function ($file) { |
|
| 124 | + return array_map(function($file) { |
|
| 125 | 125 | if (str_contains($file['name'], '/')) { |
| 126 | 126 | $file['name'] = basename($file['name']); |
| 127 | 127 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | }, $files); |
| 130 | 130 | } else { |
| 131 | 131 | // not all servers support mlsd, in those cases we parse the raw list ourselves |
| 132 | - $rawList = @ftp_rawlist($this->connection, '-aln ' . $path); |
|
| 132 | + $rawList = @ftp_rawlist($this->connection, '-aln '.$path); |
|
| 133 | 133 | if ($rawList === false) { |
| 134 | 134 | return false; |
| 135 | 135 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | // rawlist parsing logic is based on the ftp implementation from https://github.com/thephpleague/flysystem |
| 141 | 141 | private function parseRawList(array $rawList, string $directory): array { |
| 142 | - return array_map(function ($item) use ($directory) { |
|
| 142 | + return array_map(function($item) use ($directory) { |
|
| 143 | 143 | return $this->parseRawListItem($item, $directory); |
| 144 | 144 | }, $rawList); |
| 145 | 145 | } |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | 'name' => $name, |
| 186 | 186 | 'modify' => $formattedDate, |
| 187 | 187 | 'perm' => $this->normalizePermissions($permissions), |
| 188 | - 'size' => (int)$size, |
|
| 188 | + 'size' => (int) $size, |
|
| 189 | 189 | ]; |
| 190 | 190 | } |
| 191 | 191 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | |
| 201 | 201 | $map = $isDir ? $dirPermissionsMap : $filePermissionsMap; |
| 202 | 202 | |
| 203 | - return array_reduce(str_split($permissions), function ($ftpPermissions, $permission) use ($map) { |
|
| 203 | + return array_reduce(str_split($permissions), function($ftpPermissions, $permission) use ($map) { |
|
| 204 | 204 | if (isset($map[$permission])) { |
| 205 | 205 | $ftpPermissions .= $map[$permission]; |
| 206 | 206 | } |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | |
| 220 | 220 | // Check for the correct date/time format |
| 221 | 221 | $format = strlen($date) === 8 ? 'm-d-yH:iA' : 'Y-m-dH:i'; |
| 222 | - $formattedDate = \DateTime::createFromFormat($format, $date . $time)->format('YmdGis'); |
|
| 222 | + $formattedDate = \DateTime::createFromFormat($format, $date.$time)->format('YmdGis'); |
|
| 223 | 223 | |
| 224 | 224 | if ($name === '.') { |
| 225 | 225 | $type = 'cdir'; |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | 'name' => $name, |
| 235 | 235 | 'modify' => $formattedDate, |
| 236 | 236 | 'perm' => ($type === 'file') ? 'adfrw' : 'flcdmpe', |
| 237 | - 'size' => (int)$size, |
|
| 237 | + 'size' => (int) $size, |
|
| 238 | 238 | ]; |
| 239 | 239 | } |
| 240 | 240 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $timezones = \DateTimeZone::listIdentifiers(); |
| 37 | 37 | |
| 38 | 38 | if ($search !== '') { |
| 39 | - $timezones = array_filter($timezones, function ($timezone) use ($search) { |
|
| 39 | + $timezones = array_filter($timezones, function($timezone) use ($search) { |
|
| 40 | 40 | return stripos($timezone, $search) !== false; |
| 41 | 41 | }); |
| 42 | 42 | } |
@@ -6,59 +6,59 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ComposerStaticInitWorkflowEngine |
| 8 | 8 | { |
| 9 | - public static $prefixLengthsPsr4 = array ( |
|
| 9 | + public static $prefixLengthsPsr4 = array( |
|
| 10 | 10 | 'O' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'OCA\\WorkflowEngine\\' => 19, |
| 13 | 13 | ), |
| 14 | 14 | ); |
| 15 | 15 | |
| 16 | - public static $prefixDirsPsr4 = array ( |
|
| 16 | + public static $prefixDirsPsr4 = array( |
|
| 17 | 17 | 'OCA\\WorkflowEngine\\' => |
| 18 | - array ( |
|
| 19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
| 18 | + array( |
|
| 19 | + 0 => __DIR__.'/..'.'/../lib', |
|
| 20 | 20 | ), |
| 21 | 21 | ); |
| 22 | 22 | |
| 23 | - public static $classMap = array ( |
|
| 24 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
| 25 | - 'OCA\\WorkflowEngine\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
| 26 | - 'OCA\\WorkflowEngine\\BackgroundJobs\\Rotate' => __DIR__ . '/..' . '/../lib/BackgroundJobs/Rotate.php', |
|
| 27 | - 'OCA\\WorkflowEngine\\Check\\AbstractStringCheck' => __DIR__ . '/..' . '/../lib/Check/AbstractStringCheck.php', |
|
| 28 | - 'OCA\\WorkflowEngine\\Check\\FileMimeType' => __DIR__ . '/..' . '/../lib/Check/FileMimeType.php', |
|
| 29 | - 'OCA\\WorkflowEngine\\Check\\FileName' => __DIR__ . '/..' . '/../lib/Check/FileName.php', |
|
| 30 | - 'OCA\\WorkflowEngine\\Check\\FileSize' => __DIR__ . '/..' . '/../lib/Check/FileSize.php', |
|
| 31 | - 'OCA\\WorkflowEngine\\Check\\FileSystemTags' => __DIR__ . '/..' . '/../lib/Check/FileSystemTags.php', |
|
| 32 | - 'OCA\\WorkflowEngine\\Check\\RequestRemoteAddress' => __DIR__ . '/..' . '/../lib/Check/RequestRemoteAddress.php', |
|
| 33 | - 'OCA\\WorkflowEngine\\Check\\RequestTime' => __DIR__ . '/..' . '/../lib/Check/RequestTime.php', |
|
| 34 | - 'OCA\\WorkflowEngine\\Check\\RequestURL' => __DIR__ . '/..' . '/../lib/Check/RequestURL.php', |
|
| 35 | - 'OCA\\WorkflowEngine\\Check\\RequestUserAgent' => __DIR__ . '/..' . '/../lib/Check/RequestUserAgent.php', |
|
| 36 | - 'OCA\\WorkflowEngine\\Check\\TFileCheck' => __DIR__ . '/..' . '/../lib/Check/TFileCheck.php', |
|
| 37 | - 'OCA\\WorkflowEngine\\Check\\UserGroupMembership' => __DIR__ . '/..' . '/../lib/Check/UserGroupMembership.php', |
|
| 38 | - 'OCA\\WorkflowEngine\\Command\\Index' => __DIR__ . '/..' . '/../lib/Command/Index.php', |
|
| 39 | - 'OCA\\WorkflowEngine\\Controller\\AWorkflowController' => __DIR__ . '/..' . '/../lib/Controller/AWorkflowController.php', |
|
| 40 | - 'OCA\\WorkflowEngine\\Controller\\GlobalWorkflowsController' => __DIR__ . '/..' . '/../lib/Controller/GlobalWorkflowsController.php', |
|
| 41 | - 'OCA\\WorkflowEngine\\Controller\\RequestTimeController' => __DIR__ . '/..' . '/../lib/Controller/RequestTimeController.php', |
|
| 42 | - 'OCA\\WorkflowEngine\\Controller\\UserWorkflowsController' => __DIR__ . '/..' . '/../lib/Controller/UserWorkflowsController.php', |
|
| 43 | - 'OCA\\WorkflowEngine\\Entity\\File' => __DIR__ . '/..' . '/../lib/Entity/File.php', |
|
| 44 | - 'OCA\\WorkflowEngine\\Helper\\LogContext' => __DIR__ . '/..' . '/../lib/Helper/LogContext.php', |
|
| 45 | - 'OCA\\WorkflowEngine\\Helper\\ScopeContext' => __DIR__ . '/..' . '/../lib/Helper/ScopeContext.php', |
|
| 46 | - 'OCA\\WorkflowEngine\\Listener\\LoadAdditionalSettingsScriptsListener' => __DIR__ . '/..' . '/../lib/Listener/LoadAdditionalSettingsScriptsListener.php', |
|
| 47 | - 'OCA\\WorkflowEngine\\Manager' => __DIR__ . '/..' . '/../lib/Manager.php', |
|
| 48 | - 'OCA\\WorkflowEngine\\Migration\\PopulateNewlyIntroducedDatabaseFields' => __DIR__ . '/..' . '/../lib/Migration/PopulateNewlyIntroducedDatabaseFields.php', |
|
| 49 | - 'OCA\\WorkflowEngine\\Migration\\Version2000Date20190808074233' => __DIR__ . '/..' . '/../lib/Migration/Version2000Date20190808074233.php', |
|
| 50 | - 'OCA\\WorkflowEngine\\Migration\\Version2200Date20210805101925' => __DIR__ . '/..' . '/../lib/Migration/Version2200Date20210805101925.php', |
|
| 51 | - 'OCA\\WorkflowEngine\\Service\\Logger' => __DIR__ . '/..' . '/../lib/Service/Logger.php', |
|
| 52 | - 'OCA\\WorkflowEngine\\Service\\RuleMatcher' => __DIR__ . '/..' . '/../lib/Service/RuleMatcher.php', |
|
| 53 | - 'OCA\\WorkflowEngine\\Settings\\ASettings' => __DIR__ . '/..' . '/../lib/Settings/ASettings.php', |
|
| 54 | - 'OCA\\WorkflowEngine\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php', |
|
| 55 | - 'OCA\\WorkflowEngine\\Settings\\Personal' => __DIR__ . '/..' . '/../lib/Settings/Personal.php', |
|
| 56 | - 'OCA\\WorkflowEngine\\Settings\\Section' => __DIR__ . '/..' . '/../lib/Settings/Section.php', |
|
| 23 | + public static $classMap = array( |
|
| 24 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
| 25 | + 'OCA\\WorkflowEngine\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
| 26 | + 'OCA\\WorkflowEngine\\BackgroundJobs\\Rotate' => __DIR__.'/..'.'/../lib/BackgroundJobs/Rotate.php', |
|
| 27 | + 'OCA\\WorkflowEngine\\Check\\AbstractStringCheck' => __DIR__.'/..'.'/../lib/Check/AbstractStringCheck.php', |
|
| 28 | + 'OCA\\WorkflowEngine\\Check\\FileMimeType' => __DIR__.'/..'.'/../lib/Check/FileMimeType.php', |
|
| 29 | + 'OCA\\WorkflowEngine\\Check\\FileName' => __DIR__.'/..'.'/../lib/Check/FileName.php', |
|
| 30 | + 'OCA\\WorkflowEngine\\Check\\FileSize' => __DIR__.'/..'.'/../lib/Check/FileSize.php', |
|
| 31 | + 'OCA\\WorkflowEngine\\Check\\FileSystemTags' => __DIR__.'/..'.'/../lib/Check/FileSystemTags.php', |
|
| 32 | + 'OCA\\WorkflowEngine\\Check\\RequestRemoteAddress' => __DIR__.'/..'.'/../lib/Check/RequestRemoteAddress.php', |
|
| 33 | + 'OCA\\WorkflowEngine\\Check\\RequestTime' => __DIR__.'/..'.'/../lib/Check/RequestTime.php', |
|
| 34 | + 'OCA\\WorkflowEngine\\Check\\RequestURL' => __DIR__.'/..'.'/../lib/Check/RequestURL.php', |
|
| 35 | + 'OCA\\WorkflowEngine\\Check\\RequestUserAgent' => __DIR__.'/..'.'/../lib/Check/RequestUserAgent.php', |
|
| 36 | + 'OCA\\WorkflowEngine\\Check\\TFileCheck' => __DIR__.'/..'.'/../lib/Check/TFileCheck.php', |
|
| 37 | + 'OCA\\WorkflowEngine\\Check\\UserGroupMembership' => __DIR__.'/..'.'/../lib/Check/UserGroupMembership.php', |
|
| 38 | + 'OCA\\WorkflowEngine\\Command\\Index' => __DIR__.'/..'.'/../lib/Command/Index.php', |
|
| 39 | + 'OCA\\WorkflowEngine\\Controller\\AWorkflowController' => __DIR__.'/..'.'/../lib/Controller/AWorkflowController.php', |
|
| 40 | + 'OCA\\WorkflowEngine\\Controller\\GlobalWorkflowsController' => __DIR__.'/..'.'/../lib/Controller/GlobalWorkflowsController.php', |
|
| 41 | + 'OCA\\WorkflowEngine\\Controller\\RequestTimeController' => __DIR__.'/..'.'/../lib/Controller/RequestTimeController.php', |
|
| 42 | + 'OCA\\WorkflowEngine\\Controller\\UserWorkflowsController' => __DIR__.'/..'.'/../lib/Controller/UserWorkflowsController.php', |
|
| 43 | + 'OCA\\WorkflowEngine\\Entity\\File' => __DIR__.'/..'.'/../lib/Entity/File.php', |
|
| 44 | + 'OCA\\WorkflowEngine\\Helper\\LogContext' => __DIR__.'/..'.'/../lib/Helper/LogContext.php', |
|
| 45 | + 'OCA\\WorkflowEngine\\Helper\\ScopeContext' => __DIR__.'/..'.'/../lib/Helper/ScopeContext.php', |
|
| 46 | + 'OCA\\WorkflowEngine\\Listener\\LoadAdditionalSettingsScriptsListener' => __DIR__.'/..'.'/../lib/Listener/LoadAdditionalSettingsScriptsListener.php', |
|
| 47 | + 'OCA\\WorkflowEngine\\Manager' => __DIR__.'/..'.'/../lib/Manager.php', |
|
| 48 | + 'OCA\\WorkflowEngine\\Migration\\PopulateNewlyIntroducedDatabaseFields' => __DIR__.'/..'.'/../lib/Migration/PopulateNewlyIntroducedDatabaseFields.php', |
|
| 49 | + 'OCA\\WorkflowEngine\\Migration\\Version2000Date20190808074233' => __DIR__.'/..'.'/../lib/Migration/Version2000Date20190808074233.php', |
|
| 50 | + 'OCA\\WorkflowEngine\\Migration\\Version2200Date20210805101925' => __DIR__.'/..'.'/../lib/Migration/Version2200Date20210805101925.php', |
|
| 51 | + 'OCA\\WorkflowEngine\\Service\\Logger' => __DIR__.'/..'.'/../lib/Service/Logger.php', |
|
| 52 | + 'OCA\\WorkflowEngine\\Service\\RuleMatcher' => __DIR__.'/..'.'/../lib/Service/RuleMatcher.php', |
|
| 53 | + 'OCA\\WorkflowEngine\\Settings\\ASettings' => __DIR__.'/..'.'/../lib/Settings/ASettings.php', |
|
| 54 | + 'OCA\\WorkflowEngine\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php', |
|
| 55 | + 'OCA\\WorkflowEngine\\Settings\\Personal' => __DIR__.'/..'.'/../lib/Settings/Personal.php', |
|
| 56 | + 'OCA\\WorkflowEngine\\Settings\\Section' => __DIR__.'/..'.'/../lib/Settings/Section.php', |
|
| 57 | 57 | ); |
| 58 | 58 | |
| 59 | 59 | public static function getInitializer(ClassLoader $loader) |
| 60 | 60 | { |
| 61 | - return \Closure::bind(function () use ($loader) { |
|
| 61 | + return \Closure::bind(function() use ($loader) { |
|
| 62 | 62 | $loader->prefixLengthsPsr4 = ComposerStaticInitWorkflowEngine::$prefixLengthsPsr4; |
| 63 | 63 | $loader->prefixDirsPsr4 = ComposerStaticInitWorkflowEngine::$prefixDirsPsr4; |
| 64 | 64 | $loader->classMap = ComposerStaticInitWorkflowEngine::$classMap; |