Completed
Push — master ( 23c2df...5013ef )
by
unknown
33:11
created
core/Command/Info/File.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -63,17 +63,17 @@  discard block
 block discarded – undo
63 63
 		}
64 64
 
65 65
 		$output->writeln($node->getName());
66
-		$output->writeln('  fileid: ' . $node->getId());
67
-		$output->writeln('  mimetype: ' . $node->getMimetype());
68
-		$output->writeln('  modified: ' . (string)$this->l10n->l('datetime', $node->getMTime()));
66
+		$output->writeln('  fileid: '.$node->getId());
67
+		$output->writeln('  mimetype: '.$node->getMimetype());
68
+		$output->writeln('  modified: '.(string) $this->l10n->l('datetime', $node->getMTime()));
69 69
 
70 70
 		if ($node instanceof OCPFile && $node->isEncrypted()) {
71
-			$output->writeln('  ' . 'server-side encrypted: yes');
71
+			$output->writeln('  '.'server-side encrypted: yes');
72 72
 			$keyPath = $this->encryptionUtil->getFileKeyDir('', $node->getPath());
73 73
 			if ($this->rootView->file_exists($keyPath)) {
74
-				$output->writeln('    encryption key at: ' . $keyPath);
74
+				$output->writeln('    encryption key at: '.$keyPath);
75 75
 			} else {
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,28 +87,28 @@  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>.');
103
-				$output->writeln('    Run <info>occ files:scan --path ' . $node->getPath() . '</info> to attempt to resolve this.');
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
+				$output->writeln('    Run <info>occ files:scan --path '.$node->getPath().'</info> to attempt to resolve this.');
104 104
 			}
105 105
 			if ($showChildren) {
106
-				$output->writeln('  children: ' . count($children) . ':');
106
+				$output->writeln('  children: '.count($children).':');
107 107
 				foreach ($children as $child) {
108
-					$output->writeln('  - ' . $child->getName());
108
+					$output->writeln('  - '.$child->getName());
109 109
 				}
110 110
 			} else {
111
-				$output->writeln('  children: ' . count($children) . ' (use <info>--children</info> option to list)');
111
+				$output->writeln('  children: '.count($children).' (use <info>--children</info> option to list)');
112 112
 			}
113 113
 		}
114 114
 		$this->outputStorageDetails($node->getMountPoint(), $node, $input, $output);
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
 		foreach ($filesPerUser as $user => $files) {
121 121
 			$output->writeln("$user:");
122 122
 			foreach ($files as $userFile) {
123
-				$output->writeln('  ' . $userFile->getPath() . ': ' . $this->fileUtils->formatPermissions($userFile->getType(), $userFile->getPermissions()));
123
+				$output->writeln('  '.$userFile->getPath().': '.$this->fileUtils->formatPermissions($userFile->getType(), $userFile->getPermissions()));
124 124
 				$mount = $userFile->getMountPoint();
125
-				$output->writeln('    ' . $this->fileUtils->formatMountType($mount));
125
+				$output->writeln('    '.$this->fileUtils->formatMountType($mount));
126 126
 			}
127 127
 		}
128 128
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 			return;
140 140
 		}
141 141
 		if (!$storage->instanceOfStorage(IHomeStorage::class)) {
142
-			$output->writeln('  mounted at: ' . $mountPoint->getMountPoint());
142
+			$output->writeln('  mounted at: '.$mountPoint->getMountPoint());
143 143
 		}
144 144
 		if ($storage->instanceOfStorage(ObjectStoreStorage::class)) {
145 145
 			/** @var ObjectStoreStorage $storage */
@@ -155,20 +155,20 @@  discard block
 block discarded – undo
155 155
 							if (str_starts_with($bucket, $config['arguments']['bucket'])) {
156 156
 								$postfix = substr($bucket, strlen($config['arguments']['bucket']));
157 157
 								if (is_numeric($postfix)) {
158
-									$output->writeln('  object store instance: ' . $instance);
158
+									$output->writeln('  object store instance: '.$instance);
159 159
 								}
160 160
 							}
161 161
 						} else {
162 162
 							if ($config['arguments']['bucket'] === $bucket) {
163
-								$output->writeln('  object store instance: ' . $instance);
163
+								$output->writeln('  object store instance: '.$instance);
164 164
 							}
165 165
 						}
166 166
 					}
167 167
 				}
168 168
 			}
169
-			$output->writeln('  bucket: ' . $bucket);
169
+			$output->writeln('  bucket: '.$bucket);
170 170
 			if ($node instanceof \OC\Files\Node\File) {
171
-				$output->writeln('  object id: ' . $storage->getURN($node->getId()));
171
+				$output->writeln('  object id: '.$storage->getURN($node->getId()));
172 172
 				try {
173 173
 					$fh = $node->fopen('r');
174 174
 					if (!$fh) {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 					$stat = fstat($fh);
178 178
 					fclose($fh);
179 179
 					if ($stat['size'] !== $node->getSize()) {
180
-						$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');
180
+						$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');
181 181
 					}
182 182
 				} catch (\Exception $e) {
183 183
 					$output->writeln('  <error>warning: object not found in bucket</error>');
@@ -190,19 +190,19 @@  discard block
 block discarded – undo
190 190
 		}
191 191
 		if ($mountPoint instanceof ExternalMountPoint) {
192 192
 			$storageConfig = $mountPoint->getStorageConfig();
193
-			$output->writeln('  external storage id: ' . $storageConfig->getId());
194
-			$output->writeln('  external type: ' . $storageConfig->getBackend()->getText());
193
+			$output->writeln('  external storage id: '.$storageConfig->getId());
194
+			$output->writeln('  external type: '.$storageConfig->getBackend()->getText());
195 195
 		} elseif ($mountPoint instanceof GroupMountPoint) {
196
-			$output->writeln('  groupfolder id: ' . $mountPoint->getFolderId());
196
+			$output->writeln('  groupfolder id: '.$mountPoint->getFolderId());
197 197
 		}
198 198
 		if ($input->getOption('storage-tree')) {
199 199
 			$storageTmp = $storage;
200
-			$storageClass = get_class($storageTmp) . ' (cache:' . get_class($storageTmp->getCache()) . ')';
200
+			$storageClass = get_class($storageTmp).' (cache:'.get_class($storageTmp->getCache()).')';
201 201
 			while ($storageTmp instanceof Wrapper) {
202 202
 				$storageTmp = $storageTmp->getWrapperStorage();
203
-				$storageClass .= "\n\t" . '> ' . get_class($storageTmp) . ' (cache:' . get_class($storageTmp->getCache()) . ')';
203
+				$storageClass .= "\n\t".'> '.get_class($storageTmp).' (cache:'.get_class($storageTmp->getCache()).')';
204 204
 			}
205
-			$output->writeln('  storage wrapping: ' . $storageClass);
205
+			$output->writeln('  storage wrapping: '.$storageClass);
206 206
 		}
207 207
 
208 208
 	}
Please login to merge, or discard this patch.