Total Complexity | 7 |
Total Lines | 74 |
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 | * @var ?string |
||
19 | */ |
||
20 | private $region; |
||
21 | |||
22 | /** |
||
23 | * Here constructor. |
||
24 | * |
||
25 | * @param ClientInterface $client |
||
26 | * @param string $apiKey an Api key |
||
27 | * @param ?string $region region |
||
28 | */ |
||
29 | public function __construct(ClientInterface $client, string $apiKey, ?string $region = null) |
||
|
|||
30 | { |
||
31 | parent::__construct($client); |
||
32 | |||
33 | $this->api_key = $apiKey; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @return string |
||
38 | */ |
||
39 | public function getName(): string |
||
40 | { |
||
41 | return 'google_maps'; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getApiKey(): string |
||
48 | { |
||
49 | return $this->api_key; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return ?string |
||
54 | */ |
||
55 | public function getRegion(): ?string |
||
56 | { |
||
57 | return $this->region; |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @return array |
||
62 | */ |
||
63 | public function getCredentials(): array |
||
64 | { |
||
65 | return [ |
||
66 | 'key' => $this->getApiKey(), |
||
67 | ]; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @return DistanceMatrixQueryInterface |
||
72 | */ |
||
73 | public function createDistanceMatrixQuery(): DistanceMatrixQueryInterface |
||
76 | } |
||
77 | |||
78 | /** |
||
79 | * @return string |
||
80 | */ |
||
81 | public function __toString() |
||
84 | } |
||
85 | } |
||
86 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.