@@ -36,8 +36,8 @@ |
||
36 | 36 | return; |
37 | 37 | } |
38 | 38 | |
39 | - $event->addEntityCollection('files', function ($name) { |
|
40 | - $nodes = \OC::$server->getUserFolder()->getById((int)$name); |
|
39 | + $event->addEntityCollection('files', function($name) { |
|
40 | + $nodes = \OC::$server->getUserFolder()->getById((int) $name); |
|
41 | 41 | return !empty($nodes); |
42 | 42 | }); |
43 | 43 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | * we can not inject it. Thus the static call. |
132 | 132 | */ |
133 | 133 | \OC::$server->getLogger()->logException($e, [ |
134 | - 'message' => 'Could not load lazy crash reporter: ' . $e->getMessage(), |
|
134 | + 'message' => 'Could not load lazy crash reporter: '.$e->getMessage(), |
|
135 | 135 | 'level' => ILogger::FATAL, |
136 | 136 | ]); |
137 | 137 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | * we can not inject it. Thus the static call. |
148 | 148 | */ |
149 | 149 | \OC::$server->getLogger()->logException($e, [ |
150 | - 'message' => 'Could not register lazy crash reporter: ' . $e->getMessage(), |
|
150 | + 'message' => 'Could not register lazy crash reporter: '.$e->getMessage(), |
|
151 | 151 | 'level' => ILogger::FATAL, |
152 | 152 | ]); |
153 | 153 | } |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | $query = $this->connection->getQueryBuilder(); |
71 | 71 | $query->update('share') |
72 | - ->set('share_type', $query->createNamedParameter(IShare::TYPE_GUEST)) |
|
72 | + ->set('share_type', $query->createNamedParameter(IShare::TYPE_GUEST)) |
|
73 | 73 | ->where($query->expr()->eq('share_type', $query->createNamedParameter(IShare::TYPE_EMAIL))); |
74 | 74 | $query->execute(); |
75 | 75 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | public function get($search, $itemType, $itemId, $sorter = null, $shareTypes = [IShare::TYPE_USER], $limit = 10): DataResponse { |
76 | 76 | // if enumeration/user listings are disabled, we'll receive an empty |
77 | 77 | // result from search() – thus nothing else to do here. |
78 | - [$results,] = $this->collaboratorSearch->search($search, $shareTypes, false, $limit, 0); |
|
78 | + [$results, ] = $this->collaboratorSearch->search($search, $shareTypes, false, $limit, 0); |
|
79 | 79 | |
80 | 80 | $event = new AutoCompleteEvent([ |
81 | 81 | 'search' => $search, |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | 'shareTypes' => $shareTypes, |
87 | 87 | 'limit' => $limit, |
88 | 88 | ]); |
89 | - $this->dispatcher->dispatch(IManager::class . '::filterResults', $event); |
|
89 | + $this->dispatcher->dispatch(IManager::class.'::filterResults', $event); |
|
90 | 90 | $results = $event->getResults(); |
91 | 91 | |
92 | 92 | $exactMatches = $results['exact']; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $documentationUrl = $this->urlGenerator->linkToDocs('developer-code-integrity'); |
82 | 82 | $output->writeln('This command requires the --path, --privateKey and --certificate.'); |
83 | 83 | $output->writeln('Example: ./occ integrity:sign-app --path="/Users/lukasreschke/Programming/myapp/" --privateKey="/Users/lukasreschke/private/myapp.key" --certificate="/Users/lukasreschke/public/mycert.crt"'); |
84 | - $output->writeln('For more information please consult the documentation: '. $documentationUrl); |
|
84 | + $output->writeln('For more information please consult the documentation: '.$documentationUrl); |
|
85 | 85 | return 1; |
86 | 86 | } |
87 | 87 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $this->checker->writeAppSignature($path, $x509, $rsa); |
108 | 108 | $output->writeln('Successfully signed "'.$path.'"'); |
109 | 109 | } catch (\Exception $e) { |
110 | - $output->writeln('Error: ' . $e->getMessage()); |
|
110 | + $output->writeln('Error: '.$e->getMessage()); |
|
111 | 111 | return 1; |
112 | 112 | } |
113 | 113 | return 0; |
@@ -62,10 +62,10 @@ |
||
62 | 62 | if (is_array($value)) { |
63 | 63 | $output->writeln(" <comment>>></comment> $key:"); |
64 | 64 | foreach ($value as $subKey => $subValue) { |
65 | - $output->writeln(" <comment>>></comment> $subKey: " . str_repeat(' ', 46 - strlen($subKey)) . $subValue); |
|
65 | + $output->writeln(" <comment>>></comment> $subKey: ".str_repeat(' ', 46 - strlen($subKey)).$subValue); |
|
66 | 66 | } |
67 | 67 | } else { |
68 | - $output->writeln(" <comment>>></comment> $key: " . str_repeat(' ', 50 - strlen($key)) . $value); |
|
68 | + $output->writeln(" <comment>>></comment> $key: ".str_repeat(' ', 50 - strlen($key)).$value); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | return 0; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | try { |
72 | 72 | $configs = $this->validateFileContent($content); |
73 | 73 | } catch (\UnexpectedValueException $e) { |
74 | - $output->writeln('<error>' . $e->getMessage(). '</error>'); |
|
74 | + $output->writeln('<error>'.$e->getMessage().'</error>'); |
|
75 | 75 | return 1; |
76 | 76 | } |
77 | 77 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } |
92 | 92 | } |
93 | 93 | |
94 | - $output->writeln('<info>Config successfully imported from: ' . $importFile . '</info>'); |
|
94 | + $output->writeln('<info>Config successfully imported from: '.$importFile.'</info>'); |
|
95 | 95 | return 0; |
96 | 96 | } |
97 | 97 | |
@@ -145,10 +145,10 @@ discard block |
||
145 | 145 | $additionalKeys = array_diff($arrayKeys, $this->validRootKeys); |
146 | 146 | $commonKeys = array_intersect($arrayKeys, $this->validRootKeys); |
147 | 147 | if (!empty($additionalKeys)) { |
148 | - throw new \UnexpectedValueException('Found invalid entries in root: ' . implode(', ', $additionalKeys)); |
|
148 | + throw new \UnexpectedValueException('Found invalid entries in root: '.implode(', ', $additionalKeys)); |
|
149 | 149 | } |
150 | 150 | if (empty($commonKeys)) { |
151 | - throw new \UnexpectedValueException('At least one key of the following is expected: ' . implode(', ', $this->validRootKeys)); |
|
151 | + throw new \UnexpectedValueException('At least one key of the following is expected: '.implode(', ', $this->validRootKeys)); |
|
152 | 152 | } |
153 | 153 | |
154 | 154 | if (isset($array['system'])) { |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | protected function checkTypeRecursively($configValue, $configName) { |
178 | 178 | if (!is_array($configValue) && !is_bool($configValue) && !is_int($configValue) && !is_string($configValue) && !is_null($configValue)) { |
179 | - throw new \UnexpectedValueException('Invalid system config value for "' . $configName . '". Only arrays, bools, integers, strings and null (delete) are allowed.'); |
|
179 | + throw new \UnexpectedValueException('Invalid system config value for "'.$configName.'". Only arrays, bools, integers, strings and null (delete) are allowed.'); |
|
180 | 180 | } |
181 | 181 | if (is_array($configValue)) { |
182 | 182 | foreach ($configValue as $key => $value) { |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | foreach ($array as $app => $configs) { |
195 | 195 | foreach ($configs as $name => $value) { |
196 | 196 | if (!is_int($value) && !is_string($value) && !is_null($value)) { |
197 | - throw new \UnexpectedValueException('Invalid app config value for "' . $app . '":"' . $name . '". Only integers, strings and null (delete) are allowed.'); |
|
197 | + throw new \UnexpectedValueException('Invalid app config value for "'.$app.'":"'.$name.'". Only integers, strings and null (delete) are allowed.'); |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 | } |
@@ -65,13 +65,13 @@ |
||
65 | 65 | |
66 | 66 | $lastLogin = $user->getLastLogin(); |
67 | 67 | if ($lastLogin === 0) { |
68 | - $output->writeln('User ' . $user->getUID() . |
|
68 | + $output->writeln('User '.$user->getUID(). |
|
69 | 69 | ' has never logged in, yet.'); |
70 | 70 | } else { |
71 | 71 | $date = new \DateTime(); |
72 | 72 | $date->setTimestamp($lastLogin); |
73 | - $output->writeln($user->getUID() . |
|
74 | - '`s last login: ' . $date->format('d.m.Y H:i')); |
|
73 | + $output->writeln($user->getUID(). |
|
74 | + '`s last login: '.$date->format('d.m.Y H:i')); |
|
75 | 75 | } |
76 | 76 | return 0; |
77 | 77 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | protected function execute(InputInterface $input, OutputInterface $output): int { |
54 | 54 | $outputType = $input->getOption('output'); |
55 | 55 | if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { |
56 | - $certificates = array_map(function (ICertificate $certificate) { |
|
56 | + $certificates = array_map(function(ICertificate $certificate) { |
|
57 | 57 | return [ |
58 | 58 | 'name' => $certificate->getName(), |
59 | 59 | 'common_name' => $certificate->getCommonName(), |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | 'Issued By' |
80 | 80 | ]); |
81 | 81 | |
82 | - $rows = array_map(function (ICertificate $certificate) { |
|
82 | + $rows = array_map(function(ICertificate $certificate) { |
|
83 | 83 | return [ |
84 | 84 | $certificate->getName(), |
85 | 85 | $certificate->getCommonName(), |