Completed
Push — master ( cc6284...4d23a9 )
by Daniel
33:37
created
core/Command/Info/File.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -62,18 +62,18 @@  discard block
 block discarded – undo
62 62
 		}
63 63
 
64 64
 		$output->writeln($node->getName());
65
-		$output->writeln('  fileid: ' . $node->getId());
66
-		$output->writeln('  mimetype: ' . $node->getMimetype());
67
-		$output->writeln('  modified: ' . (string)$this->l10n->l('datetime', $node->getMTime()));
65
+		$output->writeln('  fileid: '.$node->getId());
66
+		$output->writeln('  mimetype: '.$node->getMimetype());
67
+		$output->writeln('  modified: '.(string) $this->l10n->l('datetime', $node->getMTime()));
68 68
 
69 69
 		if ($node instanceof OCPFile && $node->isEncrypted()) {
70
-			$output->writeln('  ' . 'server-side encrypted: yes');
70
+			$output->writeln('  '.'server-side encrypted: yes');
71 71
 			$keyPath = $this->encryptionUtil->getFileKeyDir('', $node->getPath());
72 72
 			try {
73 73
 				$this->rootFolder->get($keyPath);
74
-				$output->writeln('    encryption key at: ' . $keyPath);
74
+				$output->writeln('    encryption key at: '.$keyPath);
75 75
 			} catch (NotFoundException $e) {
76
-				$output->writeln('    <error>encryption key not found</error> should be located at: ' . $keyPath);
76
+				$output->writeln('    <error>encryption key not found</error> should be located at: '.$keyPath);
77 77
 			}
78 78
 			$storage = $node->getStorage();
79 79
 			if ($storage->instanceOfStorage(Encryption::class)) {
@@ -87,30 +87,30 @@  discard block
 block discarded – undo
87 87
 		}
88 88
 
89 89
 		if ($node instanceof Folder && $node->isEncrypted() || $node instanceof OCPFile && $node->getParent()->isEncrypted()) {
90
-			$output->writeln('  ' . 'end-to-end encrypted: yes');
90
+			$output->writeln('  '.'end-to-end encrypted: yes');
91 91
 		}
92 92
 
93
-		$output->writeln('  size: ' . Util::humanFileSize($node->getSize()));
94
-		$output->writeln('  etag: ' . $node->getEtag());
95
-		$output->writeln('  permissions: ' . $this->fileUtils->formatPermissions($node->getType(), $node->getPermissions()));
93
+		$output->writeln('  size: '.Util::humanFileSize($node->getSize()));
94
+		$output->writeln('  etag: '.$node->getEtag());
95
+		$output->writeln('  permissions: '.$this->fileUtils->formatPermissions($node->getType(), $node->getPermissions()));
96 96
 		if ($node instanceof Folder) {
97 97
 			$children = $node->getDirectoryListing();
98
-			$childSize = array_sum(array_map(function (Node $node) {
98
+			$childSize = array_sum(array_map(function(Node $node) {
99 99
 				return $node->getSize();
100 100
 			}, $children));
101 101
 			if ($childSize != $node->getSize()) {
102
-				$output->writeln('    <error>warning: folder has a size of ' . Util::humanFileSize($node->getSize()) . " but it's children sum up to " . Util::humanFileSize($childSize) . '</error>.');
102
+				$output->writeln('    <error>warning: folder has a size of '.Util::humanFileSize($node->getSize())." but it's children sum up to ".Util::humanFileSize($childSize).'</error>.');
103 103
 				if (!$node->getStorage()->instanceOfStorage(ObjectStoreStorage::class)) {
104
-					$output->writeln('    Run <info>occ files:scan --path ' . $node->getPath() . '</info> to attempt to resolve this.');
104
+					$output->writeln('    Run <info>occ files:scan --path '.$node->getPath().'</info> to attempt to resolve this.');
105 105
 				}
106 106
 			}
107 107
 			if ($showChildren) {
108
-				$output->writeln('  children: ' . count($children) . ':');
108
+				$output->writeln('  children: '.count($children).':');
109 109
 				foreach ($children as $child) {
110
-					$output->writeln('  - ' . $child->getName());
110
+					$output->writeln('  - '.$child->getName());
111 111
 				}
112 112
 			} else {
113
-				$output->writeln('  children: ' . count($children) . ' (use <info>--children</info> option to list)');
113
+				$output->writeln('  children: '.count($children).' (use <info>--children</info> option to list)');
114 114
 			}
115 115
 		}
116 116
 		$this->outputStorageDetails($node->getMountPoint(), $node, $input, $output);
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
 		foreach ($filesPerUser as $user => $files) {
123 123
 			$output->writeln("$user:");
124 124
 			foreach ($files as $userFile) {
125
-				$output->writeln('  ' . $userFile->getPath() . ': ' . $this->fileUtils->formatPermissions($userFile->getType(), $userFile->getPermissions()));
125
+				$output->writeln('  '.$userFile->getPath().': '.$this->fileUtils->formatPermissions($userFile->getType(), $userFile->getPermissions()));
126 126
 				$mount = $userFile->getMountPoint();
127
-				$output->writeln('    ' . $this->fileUtils->formatMountType($mount));
127
+				$output->writeln('    '.$this->fileUtils->formatMountType($mount));
128 128
 			}
129 129
 		}
130 130
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 			return;
142 142
 		}
143 143
 		if (!$storage->instanceOfStorage(IHomeStorage::class)) {
144
-			$output->writeln('  mounted at: ' . $mountPoint->getMountPoint());
144
+			$output->writeln('  mounted at: '.$mountPoint->getMountPoint());
145 145
 		}
146 146
 		if ($storage->instanceOfStorage(ObjectStoreStorage::class)) {
147 147
 			/** @var ObjectStoreStorage $storage */
@@ -157,20 +157,20 @@  discard block
 block discarded – undo
157 157
 							if (str_starts_with($bucket, $config['arguments']['bucket'])) {
158 158
 								$postfix = substr($bucket, strlen($config['arguments']['bucket']));
159 159
 								if (is_numeric($postfix)) {
160
-									$output->writeln('  object store instance: ' . $instance);
160
+									$output->writeln('  object store instance: '.$instance);
161 161
 								}
162 162
 							}
163 163
 						} else {
164 164
 							if ($config['arguments']['bucket'] === $bucket) {
165
-								$output->writeln('  object store instance: ' . $instance);
165
+								$output->writeln('  object store instance: '.$instance);
166 166
 							}
167 167
 						}
168 168
 					}
169 169
 				}
170 170
 			}
171
-			$output->writeln('  bucket: ' . $bucket);
171
+			$output->writeln('  bucket: '.$bucket);
172 172
 			if ($node instanceof \OC\Files\Node\File) {
173
-				$output->writeln('  object id: ' . $storage->getURN($node->getId()));
173
+				$output->writeln('  object id: '.$storage->getURN($node->getId()));
174 174
 				try {
175 175
 					$fh = $node->fopen('r');
176 176
 					if (!$fh) {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 					$stat = fstat($fh);
180 180
 					fclose($fh);
181 181
 					if (isset($stat['size']) && $stat['size'] !== $node->getSize()) {
182
-						$output->writeln('  <error>warning: object had a size of ' . $stat['size'] . ' but cache entry has a size of ' . $node->getSize() . '</error>. This should have been automatically repaired');
182
+						$output->writeln('  <error>warning: object had a size of '.$stat['size'].' but cache entry has a size of '.$node->getSize().'</error>. This should have been automatically repaired');
183 183
 					}
184 184
 				} catch (\Exception $e) {
185 185
 					$output->writeln('  <error>warning: object not found in bucket</error>');
@@ -192,19 +192,19 @@  discard block
 block discarded – undo
192 192
 		}
193 193
 		if ($mountPoint instanceof ExternalMountPoint) {
194 194
 			$storageConfig = $mountPoint->getStorageConfig();
195
-			$output->writeln('  external storage id: ' . $storageConfig->getId());
196
-			$output->writeln('  external type: ' . $storageConfig->getBackend()->getText());
195
+			$output->writeln('  external storage id: '.$storageConfig->getId());
196
+			$output->writeln('  external type: '.$storageConfig->getBackend()->getText());
197 197
 		} elseif ($mountPoint instanceof GroupMountPoint) {
198
-			$output->writeln('  groupfolder id: ' . $mountPoint->getFolderId());
198
+			$output->writeln('  groupfolder id: '.$mountPoint->getFolderId());
199 199
 		}
200 200
 		if ($input->getOption('storage-tree')) {
201 201
 			$storageTmp = $storage;
202
-			$storageClass = get_class($storageTmp) . ' (cache:' . get_class($storageTmp->getCache()) . ')';
202
+			$storageClass = get_class($storageTmp).' (cache:'.get_class($storageTmp->getCache()).')';
203 203
 			while ($storageTmp instanceof Wrapper) {
204 204
 				$storageTmp = $storageTmp->getWrapperStorage();
205
-				$storageClass .= "\n\t" . '> ' . get_class($storageTmp) . ' (cache:' . get_class($storageTmp->getCache()) . ')';
205
+				$storageClass .= "\n\t".'> '.get_class($storageTmp).' (cache:'.get_class($storageTmp->getCache()).')';
206 206
 			}
207
-			$output->writeln('  storage wrapping: ' . $storageClass);
207
+			$output->writeln('  storage wrapping: '.$storageClass);
208 208
 		}
209 209
 
210 210
 	}
Please login to merge, or discard this patch.