@@ -23,7 +23,7 @@ class AsyncAwsS3Adapter extends AbstractAdapter implements CanOverwriteFiles
23
23
{
24
24
public const PUBLIC_GRANT_URI = 'http://acs.amazonaws.com/groups/global/AllUsers ' ;
25
25
26
- private static $ resultMap = [
26
+ private const RESULT_MAP = [
27
27
'Body ' => 'contents ' ,
28
28
'ContentLength ' => 'size ' ,
29
29
'ContentType ' => 'mimetype ' ,
@@ -34,7 +34,7 @@ class AsyncAwsS3Adapter extends AbstractAdapter implements CanOverwriteFiles
34
34
'VersionId ' => 'versionid ' ,
35
35
];
36
36
37
- private static $ metaOptions = [
37
+ private const META_OPTIONS = [
38
38
'ACL ' ,
39
39
'CacheControl ' ,
40
40
'ContentDisposition ' ,
@@ -496,7 +496,7 @@ protected function getOptionsFromConfig(Config $config): array
496
496
$ options ['ContentType ' ] = $ mimetype ;
497
497
}
498
498
499
- foreach (static :: $ metaOptions as $ option ) {
499
+ foreach (self :: META_OPTIONS as $ option ) {
500
500
if (!$ config ->has ($ option )) {
501
501
continue ;
502
502
}
@@ -537,9 +537,9 @@ protected function normalizeResponse(object $output, ?string $path = null): arra
537
537
}
538
538
}
539
539
540
- if ($ this ->isOnlyDir ($ result [ ' path ' ] )) {
540
+ if ($ this ->isOnlyDir ($ path )) {
541
541
$ result ['type ' ] = 'dir ' ;
542
- $ result ['path ' ] = rtrim ($ result [ ' path ' ] , '/ ' );
542
+ $ result ['path ' ] = rtrim ($ path , '/ ' );
543
543
544
544
return $ result ;
545
545
}
@@ -571,7 +571,7 @@ private function isOnlyDir(string $path): bool
571
571
private function resultMap (object $ object ): array
572
572
{
573
573
$ result = [];
574
- foreach (static :: $ resultMap as $ from => $ to ) {
574
+ foreach (self :: RESULT_MAP as $ from => $ to ) {
575
575
$ methodName = 'get ' . $ from ;
576
576
if (method_exists ($ object , $ methodName )) {
577
577
$ result [$ to ] = \call_user_func ([$ object , $ methodName ]);
0 commit comments