Code Duplication    Length = 37-42 lines in 2 locations

src/Databases/EdgeDatabase.php 1 location

@@ 10-51 (lines=42) @@
7
/**
8
 * Formats and returns our expected data set according to the Net Acuity Edge type database.
9
 */
10
final class EdgeDatabase extends AbstractNetAcuityDatabase
11
{
12
    /**
13
     * EdgeDatabase constructor.
14
     *
15
     * @param ClientInterface $client       The injected GuzzleHttp Client.
16
     * @param string          $apiUserToken The Net Acuity API User Token.
17
     */
18
    public function __construct(ClientInterface $client, string $apiUserToken)
19
    {
20
        parent::__construct($client, $apiUserToken);
21
22
        $this->databaseIdentifier = 4;
23
24
        $this->translations = [
25
            'area-code' => 'edge-area-codes',
26
            'city' => 'edge-city',
27
            'city-code' => 'edge-city-code',
28
            'city-conf' => 'edge-city-conf',
29
            'conn-speed' => 'edge-conn-speed',
30
            'continent-code' => 'edge-continent-code',
31
            'country' => 'edge-country',
32
            'country-code' => 'edge-country-code',
33
            'country-conf' => 'edge-country-conf',
34
            'county' => 'edge-county',
35
            'gmt-offset' => 'edge-gmt-offset',
36
            'in-dist' => 'edge-in-dst',
37
            'ip' => 'ip',
38
            'latitude' => 'edge-latitude',
39
            'longitude' => 'edge-longitude',
40
            'metro-code' => 'edge-metro-code',
41
            'postal-conf' => 'edge-postal-conf',
42
            'region' => 'edge-region',
43
            'region-code' => 'edge-region-code',
44
            'region-conf' => 'edge-region-conf',
45
            'timezone-name' => 'edge-timezone-name',
46
            'transaction-id' => 'trans-id',
47
            'two-letter-country' => 'edge-two-letter-country',
48
            'zip-code' => 'edge-postal-code',
49
        ];
50
    }
51
}
52

src/Databases/PulseDatabase.php 1 location

@@ 7-43 (lines=37) @@
4
5
use GuzzleHttp\ClientInterface;
6
7
class PulseDatabase extends AbstractNetAcuityDatabase
8
{
9
    public function __construct(ClientInterface $client, string $apiUserToken)
10
    {
11
        parent::__construct($client, $apiUserToken);
12
13
        $this->databaseIdentifier = 26;
14
15
        $this->translations = [
16
            'area-code' => 'pulse-area-codes',
17
            'city' => 'pulse-city',
18
            'city-code' => 'pulse-city-code',
19
            'city-conf' => 'pulse-city-conf',
20
            'conn-speed' => 'pulse-conn-speed',
21
            'conn-type' => 'pulse-conn-type',
22
            'continent-code' => 'pulse-continent-code',
23
            'country' => 'pulse-country',
24
            'country-code' => 'pulse-country-code',
25
            'country-conf' => 'pulse-country-conf',
26
            'county' => 'pulse-county',
27
            'gmt-offset' => 'pulse-gmt-offset',
28
            'in-dist' => 'pulse-in-dst',
29
            'ip' => 'ip',
30
            'latitude' => 'pulse-latitude',
31
            'longitude' => 'pulse-longitude',
32
            'metro-code' => 'pulse-metro-code',
33
            'postal-conf' => 'pulse-postal-conf',
34
            'region' => 'pulse-region',
35
            'region-code' => 'pulse-region-code',
36
            'region-conf' => 'pulse-region-conf',
37
            'timezone-name' => 'pulse-timezone-name',
38
            'transaction-id' => 'trans-id',
39
            'two-letter-country' => 'pulse-two-letter-country',
40
            'zip-code' => 'pulse-postal-code',
41
        ];
42
    }
43
}
44