It seems like $name can also be of type null; however, parameter $name of Spiral\Storage\Config\DT...wsS3Info::__construct() does only seem to accept string, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
26
return new AwsS3Info(/** @scrutinizer ignore-type */ $name, $this->buildAwsS3ServerDescription());
Loading history...
27
}
28
29
protected function buildAwsS3ServerDescription(): array
30
{
31
return [
32
AwsS3Info::ADAPTER_KEY => AwsS3V3Adapter::class,
33
AwsS3Info::OPTIONS_KEY => [
34
AwsS3Info::BUCKET_KEY => 'debugBucket',
35
AwsS3Info::CLIENT_KEY => $this->getAwsS3Client(),
36
],
37
];
38
}
39
40
protected function getAwsS3Client(): S3Client
41
{
42
return new S3Client([
43
'credentials' => new Credentials('someKey', 'someSecret'),
44
'version' => 'latest',
45
'region' => 'west',
46
]);
47
}
48
49
protected function getAwsS3VisibilityOption(): array