@@ -23,7 +23,7 @@ class AsyncAwsS3Adapter extends AbstractAdapter implements CanOverwriteFiles
2323{
2424 public const PUBLIC_GRANT_URI = 'http://acs.amazonaws.com/groups/global/AllUsers ' ;
2525
26- private static $ resultMap = [
26+ private const RESULT_MAP = [
2727 'Body ' => 'contents ' ,
2828 'ContentLength ' => 'size ' ,
2929 'ContentType ' => 'mimetype ' ,
@@ -34,7 +34,7 @@ class AsyncAwsS3Adapter extends AbstractAdapter implements CanOverwriteFiles
3434 'VersionId ' => 'versionid ' ,
3535 ];
3636
37- private static $ metaOptions = [
37+ private const META_OPTIONS = [
3838 'ACL ' ,
3939 'CacheControl ' ,
4040 'ContentDisposition ' ,
@@ -496,7 +496,7 @@ protected function getOptionsFromConfig(Config $config): array
496496 $ options ['ContentType ' ] = $ mimetype ;
497497 }
498498
499- foreach (static :: $ metaOptions as $ option ) {
499+ foreach (self :: META_OPTIONS as $ option ) {
500500 if (!$ config ->has ($ option )) {
501501 continue ;
502502 }
@@ -537,9 +537,9 @@ protected function normalizeResponse(object $output, ?string $path = null): arra
537537 }
538538 }
539539
540- if ($ this ->isOnlyDir ($ result [ ' path ' ] )) {
540+ if ($ this ->isOnlyDir ($ path )) {
541541 $ result ['type ' ] = 'dir ' ;
542- $ result ['path ' ] = rtrim ($ result [ ' path ' ] , '/ ' );
542+ $ result ['path ' ] = rtrim ($ path , '/ ' );
543543
544544 return $ result ;
545545 }
@@ -571,7 +571,7 @@ private function isOnlyDir(string $path): bool
571571 private function resultMap (object $ object ): array
572572 {
573573 $ result = [];
574- foreach (static :: $ resultMap as $ from => $ to ) {
574+ foreach (self :: RESULT_MAP as $ from => $ to ) {
575575 $ methodName = 'get ' . $ from ;
576576 if (method_exists ($ object , $ methodName )) {
577577 $ result [$ to ] = \call_user_func ([$ object , $ methodName ]);
0 commit comments