Skip to content

Commit 4ee8a5f

Browse files
Roman HaninRoman Hanin
authored andcommitted
B2B-1610: Upgrade to Flysystem 2.0
- removed unnecessary private wrapper method from cached adapter
1 parent 2462490 commit 4ee8a5f

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,23 +188,12 @@ public function listContents(string $path, bool $deep): iterable
188188
return $this->adapter->listContents($path, $deep);
189189
}
190190

191-
/**
192-
* Get metadata.
193-
*
194-
* @param string $path
195-
* @return array
196-
*/
197-
private function getMetadata($path)
198-
{
199-
return $this->metadataProvider->getMetadata($path);
200-
}
201-
202191
/**
203192
* {@inheritdoc}
204193
*/
205194
public function fileSize(string $path): FileAttributes
206195
{
207-
$result = $this->getMetadata($path);
196+
$result = $this->metadataProvider->getMetadata($path);
208197
return new FileAttributes($path, (int)$result['size']);
209198
}
210199

@@ -213,7 +202,7 @@ public function fileSize(string $path): FileAttributes
213202
*/
214203
public function mimeType(string $path): FileAttributes
215204
{
216-
$result = $this->getMetadata($path);
205+
$result = $this->metadataProvider->getMetadata($path);
217206
return new FileAttributes($path, null, null, null, $result['mimetype']);
218207
}
219208

@@ -222,7 +211,7 @@ public function mimeType(string $path): FileAttributes
222211
*/
223212
public function lastModified(string $path): FileAttributes
224213
{
225-
$result = $this->getMetadata($path);
214+
$result = $this->metadataProvider->getMetadata($path);
226215
return new FileAttributes($path, null, null, (int)$result['timestamp']);
227216
}
228217

@@ -231,7 +220,7 @@ public function lastModified(string $path): FileAttributes
231220
*/
232221
public function visibility(string $path): FileAttributes
233222
{
234-
$result = $this->getMetadata($path);
223+
$result = $this->metadataProvider->getMetadata($path);
235224
return new FileAttributes($path, null, $result['visibility']);
236225
}
237226
}

0 commit comments

Comments
 (0)