GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

SplitPointField::getLatitudeColumn()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace Solvire\API\Serializers\DataFields;
3
4
use Solvire\API\Exceptions\InvalidParameterException;
5
use Solvire\Utilities\OptionsChecker as Ch;
6
7
/**
8
 * Kind of a hack to couple the data elements in separate fields as a single point for representation
9
 * In GIS databases this would be one data element.
10
 *
11
 *
12
 * @author solvire <[email protected]>
13
 * @package DataFields
14
 * @namespace Solvire\API\Serializers\DataFields
15
 */
16
class SplitPointField extends PointField
17
{
18
19
    protected $requiredFields = [
20
        'latitudeColumn',
21
        'longitudeColumn'
22
    ];
23
24
    protected $cast = 'array';
25
26
    protected $latitudeColumn = 'latitude';
27
28
    protected $longitudeColumn = 'longitude';
29
30
    /**
31
     * among the other variables we need to have the column names for longitude and latitude added in here
32
     *
33
     * @param array $options            
34
     */
35 3
    public function __construct($options)
36
    {
37 3
        Ch::ek($options, $this->requiredFields);
38 3
        $this->latitudeColumn = $options['latitudeColumn'];
39 3
        $this->longitudeColumn = $options['longitudeColumn'];
40 3
        parent::__construct($options);
41 3
    }
42
43 2
    public function getLatitudeColumn()
44
    {
45 2
        return $this->latitudeColumn;
46
    }
47
48 2
    public function getLongitudeColumn()
49
    {
50 2
        return $this->longitudeColumn;
51
    }
52
}
53