| 1 | <?php |
||
| 8 | class AwsS3PresignedUrlResolver implements ResolverInterface |
||
| 9 | { |
||
| 10 | /** @var S3Client */ |
||
| 11 | private $service; |
||
| 12 | |||
| 13 | /** @var string */ |
||
| 14 | private $bucket; |
||
| 15 | |||
| 16 | /** @var string */ |
||
| 17 | private $baseDir; |
||
| 18 | |||
| 19 | /** @var \DateTimeInterface */ |
||
| 20 | private $expiresAt; |
||
| 21 | |||
| 22 | public function __construct(S3Client $service, $bucket, $baseDir, \DateTimeInterface $expiresAt) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Resolves given object path into presigned request URI. |
||
| 32 | * |
||
| 33 | * @param string $path |
||
| 34 | * |
||
| 35 | * @return (string) \Psr\Http\Message\UriInterface |
||
| 36 | */ |
||
| 37 | public function resolve($path) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Appends baseDir to $key. |
||
| 49 | * |
||
| 50 | * @param string $key |
||
| 51 | * |
||
| 52 | * @return string |
||
| 53 | */ |
||
| 54 | private function computePath($key) |
||
| 58 | } |
||
| 59 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: