Completed
Push — master ( 6ade04...7267ef )
by Chris
8s
created

EdgeDatabase::__construct()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 33
Code Lines 28

Duplication

Lines 33
Ratio 100 %

Importance

Changes 0
Metric Value
dl 33
loc 33
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 28
nc 1
nop 2
1
<?php
2
3
namespace DominionEnterprises\NetAcuity\Databases;
4
5
use GuzzleHttp\ClientInterface;
6
7
/**
8
 * Formats and returns our expected data set according to the Net Acuity Edge type database.
9
 */
10 View Code Duplication
final class EdgeDatabase extends AbstractNetAcuityDatabase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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