Total Complexity | 7 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class GoogleMaps extends AbstractProvider |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $api_key; |
||
16 | |||
17 | /** |
||
18 | * @var string|null |
||
19 | */ |
||
20 | private $region; |
||
21 | |||
22 | /** |
||
23 | * Here constructor. |
||
24 | * |
||
25 | * @param string $apiKey an Api key |
||
26 | * @param string|null $region region |
||
27 | */ |
||
28 | public function __construct(ClientInterface $client, string $apiKey, ?string $region = null) |
||
29 | { |
||
30 | parent::__construct($client); |
||
31 | |||
32 | $this->api_key = $apiKey; |
||
33 | $this->region = $region; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | */ |
||
39 | public function getName(): string |
||
42 | } |
||
43 | |||
44 | public function getApiKey(): string |
||
45 | { |
||
46 | return $this->api_key; |
||
47 | } |
||
48 | |||
49 | public function getRegion(): ?string |
||
50 | { |
||
51 | return $this->region; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function getCredentials(): array |
||
58 | { |
||
59 | return [ |
||
60 | 'key' => $this->getApiKey(), |
||
61 | ]; |
||
62 | } |
||
63 | |||
64 | public function createDistanceMatrixQuery(): DistanceMatrixQueryInterface |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * @return string |
||
71 | */ |
||
72 | public function __toString() |
||
75 | } |
||
76 | } |
||
77 |