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