ApiAuth::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
c 1
b 0
f 0
dl 0
loc 4
ccs 1
cts 1
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace kalanis\google_maps\Remote\Headers;
4
5
6
use kalanis\google_maps\ClientConfig;
7
8
9
/**
10
 * Google Maps PHP Client - API auth params
11
 */
12
class ApiAuth
13
{
14 56
    public function __construct(
15
        protected readonly ClientConfig $config,
16
    )
17
    {
18 56
    }
19
20 3
    public function getKey(): string
21
    {
22 3
        return $this->config->getApiKey();
23
    }
24
25
    /**
26
     * @return array<string, string>
27
     */
28 37
    public function getAuthParams(): array
29
    {
30 37
        return ['key' => $this->config->getApiKey()];
31
    }
32
}
33