@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $json = file_get_contents('php://stdin'); |
113 | 113 | } else { |
114 | 114 | if (!file_exists($path)) { |
115 | - $output->writeln('<error>File not found: ' . $path . '</error>'); |
|
115 | + $output->writeln('<error>File not found: '.$path.'</error>'); |
|
116 | 116 | return 1; |
117 | 117 | } |
118 | 118 | $json = file_get_contents($path); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $existingMount->getApplicableUsers() === $mount->getApplicableUsers() && |
165 | 165 | $existingMount->getBackendOptions() === $mount->getBackendOptions() |
166 | 166 | ) { |
167 | - $output->writeln("<error>Duplicate mount (" . $mount->getMountPoint() . ")</error>"); |
|
167 | + $output->writeln("<error>Duplicate mount (".$mount->getMountPoint().")</error>"); |
|
168 | 168 | return 1; |
169 | 169 | } |
170 | 170 | } |
@@ -78,7 +78,7 @@ |
||
78 | 78 | $olderVersions = $ms->getMigratedVersions(); |
79 | 79 | $olderVersions[] = '0'; |
80 | 80 | $olderVersions[] = 'prev'; |
81 | - if (in_array($version, $olderVersions, true)) { |
|
81 | + if (in_array($version, $olderVersions, true)) { |
|
82 | 82 | $output->writeln('<error>Can not go back to previous migration without debug enabled</error>'); |
83 | 83 | return 1; |
84 | 84 | } |
@@ -60,14 +60,14 @@ discard block |
||
60 | 60 | $appName = $input->getArgument('app'); |
61 | 61 | $version = $input->getArgument('version'); |
62 | 62 | |
63 | - if (!preg_match('/^\d{1,16}$/',$version)) { |
|
63 | + if (!preg_match('/^\d{1,16}$/', $version)) { |
|
64 | 64 | $output->writeln('<error>The given version is invalid. Only 0-9 are allowed (max. 16 digits)</error>'); |
65 | 65 | return 1; |
66 | 66 | } |
67 | 67 | |
68 | - $schemaFile = $this->appManager->getAppPath($appName) . '/appinfo/database.xml'; |
|
68 | + $schemaFile = $this->appManager->getAppPath($appName).'/appinfo/database.xml'; |
|
69 | 69 | if (!file_exists($schemaFile)) { |
70 | - $output->writeln('<error>App ' . $appName . ' does not have a database.xml file</error>'); |
|
70 | + $output->writeln('<error>App '.$appName.' does not have a database.xml file</error>'); |
|
71 | 71 | return 2; |
72 | 72 | } |
73 | 73 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $ms = new MigrationService($appName, $this->connection, new ConsoleOutput($output)); |
81 | 81 | |
82 | 82 | $date = date('YmdHis'); |
83 | - $path = $this->generateMigration($ms, 'Version' . $version . 'Date' . $date, $schemaBody); |
|
83 | + $path = $this->generateMigration($ms, 'Version'.$version.'Date'.$date, $schemaBody); |
|
84 | 84 | |
85 | 85 | $output->writeln("New migration class has been generated to <info>$path</info>"); |
86 | 86 | return 0; |
@@ -70,12 +70,12 @@ |
||
70 | 70 | list($alias, $columnName) = explode('.', $string, 2); |
71 | 71 | |
72 | 72 | if ($columnName === '*') { |
73 | - return '`' . $alias . '`.*'; |
|
73 | + return '`'.$alias.'`.*'; |
|
74 | 74 | } |
75 | 75 | |
76 | - return '`' . $alias . '`.`' . $columnName . '`'; |
|
76 | + return '`'.$alias.'`.`'.$columnName.'`'; |
|
77 | 77 | } |
78 | 78 | |
79 | - return '`' . $string . '`'; |
|
79 | + return '`'.$string.'`'; |
|
80 | 80 | } |
81 | 81 | } |
@@ -128,32 +128,32 @@ discard block |
||
128 | 128 | $authBackend = $this->backendService->getAuthMechanism($authIdentifier); |
129 | 129 | |
130 | 130 | if (!Filesystem::isValidPath($mountPoint)) { |
131 | - $output->writeln('<error>Invalid mountpoint "' . $mountPoint . '"</error>'); |
|
131 | + $output->writeln('<error>Invalid mountpoint "'.$mountPoint.'"</error>'); |
|
132 | 132 | return 1; |
133 | 133 | } |
134 | 134 | if (is_null($storageBackend)) { |
135 | - $output->writeln('<error>Storage backend with identifier "' . $storageIdentifier . '" not found (see `occ files_external:backends` for possible values)</error>'); |
|
135 | + $output->writeln('<error>Storage backend with identifier "'.$storageIdentifier.'" not found (see `occ files_external:backends` for possible values)</error>'); |
|
136 | 136 | return 404; |
137 | 137 | } |
138 | 138 | if (is_null($authBackend)) { |
139 | - $output->writeln('<error>Authentication backend with identifier "' . $authIdentifier . '" not found (see `occ files_external:backends` for possible values)</error>'); |
|
139 | + $output->writeln('<error>Authentication backend with identifier "'.$authIdentifier.'" not found (see `occ files_external:backends` for possible values)</error>'); |
|
140 | 140 | return 404; |
141 | 141 | } |
142 | 142 | $supportedSchemes = array_keys($storageBackend->getAuthSchemes()); |
143 | 143 | if (!in_array($authBackend->getScheme(), $supportedSchemes)) { |
144 | - $output->writeln('<error>Authentication backend "' . $authIdentifier . '" not valid for storage backend "' . $storageIdentifier . '" (see `occ files_external:backends storage ' . $storageIdentifier . '` for possible values)</error>'); |
|
144 | + $output->writeln('<error>Authentication backend "'.$authIdentifier.'" not valid for storage backend "'.$storageIdentifier.'" (see `occ files_external:backends storage '.$storageIdentifier.'` for possible values)</error>'); |
|
145 | 145 | return 1; |
146 | 146 | } |
147 | 147 | |
148 | 148 | $config = []; |
149 | 149 | foreach ($configInput as $configOption) { |
150 | 150 | if (!strpos($configOption, '=')) { |
151 | - $output->writeln('<error>Invalid mount configuration option "' . $configOption . '"</error>'); |
|
151 | + $output->writeln('<error>Invalid mount configuration option "'.$configOption.'"</error>'); |
|
152 | 152 | return 1; |
153 | 153 | } |
154 | 154 | list($key, $value) = explode('=', $configOption, 2); |
155 | 155 | if (!$this->validateParam($key, $value, $storageBackend, $authBackend)) { |
156 | - $output->writeln('<error>Unknown configuration for backends "' . $key . '"</error>'); |
|
156 | + $output->writeln('<error>Unknown configuration for backends "'.$key.'"</error>'); |
|
157 | 157 | return 1; |
158 | 158 | } |
159 | 159 | $config[$key] = $value; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | |
168 | 168 | if ($user) { |
169 | 169 | if (!$this->userManager->userExists($user)) { |
170 | - $output->writeln('<error>User "' . $user . '" not found</error>'); |
|
170 | + $output->writeln('<error>User "'.$user.'" not found</error>'); |
|
171 | 171 | return 1; |
172 | 172 | } |
173 | 173 | $mount->setApplicableUsers([$user]); |
@@ -178,9 +178,9 @@ discard block |
||
178 | 178 | } else { |
179 | 179 | $this->getStorageService($user)->addStorage($mount); |
180 | 180 | if ($input->getOption('output') === self::OUTPUT_FORMAT_PLAIN) { |
181 | - $output->writeln('<info>Storage created with id ' . $mount->getId() . '</info>'); |
|
181 | + $output->writeln('<info>Storage created with id '.$mount->getId().'</info>'); |
|
182 | 182 | } else { |
183 | - $output->writeln((string)$mount->getId()); |
|
183 | + $output->writeln((string) $mount->getId()); |
|
184 | 184 | } |
185 | 185 | } |
186 | 186 | return 0; |
@@ -304,9 +304,9 @@ |
||
304 | 304 | */ |
305 | 305 | public static function linkToRemote($service) { |
306 | 306 | $urlGenerator = \OC::$server->getURLGenerator(); |
307 | - $remoteBase = $urlGenerator->linkTo('', 'remote.php') . '/' . $service; |
|
307 | + $remoteBase = $urlGenerator->linkTo('', 'remote.php').'/'.$service; |
|
308 | 308 | return $urlGenerator->getAbsoluteURL( |
309 | - $remoteBase . (($service[strlen($service) - 1] != '/') ? '/' : '') |
|
309 | + $remoteBase.(($service[strlen($service) - 1] != '/') ? '/' : '') |
|
310 | 310 | ); |
311 | 311 | } |
312 | 312 |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | // default responders |
80 | 80 | $this->responders = [ |
81 | - 'json' => function ($data) { |
|
81 | + 'json' => function($data) { |
|
82 | 82 | if ($data instanceof DataResponse) { |
83 | 83 | $response = new JSONResponse( |
84 | 84 | $data->getData(), |
@@ -153,6 +153,6 @@ discard block |
||
153 | 153 | return $responder($response); |
154 | 154 | } |
155 | 155 | throw new \DomainException('No responder registered for format '. |
156 | - $format . '!'); |
|
156 | + $format.'!'); |
|
157 | 157 | } |
158 | 158 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->file = $file; |
52 | 52 | $this->setStatus($statusCode); |
53 | 53 | $this->setHeaders(array_merge($this->getHeaders(), $headers)); |
54 | - $this->addHeader('Content-Disposition', 'inline; filename="' . rawurldecode($file->getName()) . '"'); |
|
54 | + $this->addHeader('Content-Disposition', 'inline; filename="'.rawurldecode($file->getName()).'"'); |
|
55 | 55 | |
56 | 56 | $this->setETag($file->getEtag()); |
57 | 57 | $lastModified = new \DateTime(); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function callback(IOutput $output) { |
67 | 67 | if ($output->getHttpResponseCode() !== Http::STATUS_NOT_MODIFIED) { |
68 | - $output->setHeader('Content-Length: ' . $this->file->getSize()); |
|
68 | + $output->setHeader('Content-Length: '.$this->file->getSize()); |
|
69 | 69 | $output->setOutput($this->file->getContent()); |
70 | 70 | } |
71 | 71 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $this->filename = $filename; |
44 | 44 | $this->contentType = $contentType; |
45 | 45 | |
46 | - $this->addHeader('Content-Disposition', 'attachment; filename="' . $filename . '"'); |
|
46 | + $this->addHeader('Content-Disposition', 'attachment; filename="'.$filename.'"'); |
|
47 | 47 | $this->addHeader('Content-Type', $contentType); |
48 | 48 | } |
49 | 49 | } |