Total Complexity | 4 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
11 | class AmazonUriFactory implements UriFactoryInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private const ERROR_NOT_AVAILABLE = |
||
17 | 'The "aws/aws-sdk-php" package is supplied with the Guzzle PSR-7 ' . |
||
18 | 'implementation, but it is not available. Please install the ' . |
||
19 | '"aws/aws-sdk-php" package or use any other implementation of PSR-17 factories.' |
||
20 | ; |
||
21 | |||
22 | /** |
||
23 | * AmazonUriFactory constructor. |
||
24 | */ |
||
25 | public function __construct() |
||
26 | { |
||
27 | $this->assertAvailable(); |
||
28 | } |
||
29 | |||
30 | public function createUri(string $uri = ''): UriInterface |
||
31 | { |
||
32 | return new Uri($uri); |
||
33 | } |
||
34 | |||
35 | private function assertAvailable(): void |
||
42 | } |
||
43 | } |
||
44 |