Completed
Push — master ( 97fc71...726d4b )
by WEBEWEB
01:08
created

ReverseRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 31
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getResourcePath() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the geo-api-library package.
5
 *
6
 * (c) 2020 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\GeoAPI\Request\Adresse;
13
14
use WBW\Library\GeoAPI\Model\Attribute\FloatLatTrait;
15
use WBW\Library\GeoAPI\Model\Attribute\FloatLonTrait;
16
use WBW\Library\GeoAPI\Request\AbstractRequest;
17
18
/**
19
 * Reverse request.
20
 *
21
 * @author webeweb <https://github.com/webeweb/>
22
 * @package WBW\Library\GeoAPI\Request\Adresse
23
 */
24
class ReverseRequest extends AbstractRequest {
25
26
    use FloatLatTrait;
27
    use FloatLonTrait;
28
29
    /**
30
     * Resource path.
31
     *
32
     * @var string
33
     */
34
    const RESOURCE_PATH = "/reverse/";
35
36
    /**
37
     * Constructor.
38
     *
39
     * @param float|null $lat The latitude.
40
     * @param float|null $lon The longitude.
41
     */
42
    public function __construct(float $lat = null, float $lon = null) {
43
        parent::__construct();
44
        $this->setLat($lat);
45
        $this->setLon($lon);
46
    }
47
48
    /**
49
     * {@inheritDoc}
50
     */
51
    public function getResourcePath(): string {
52
        return self::RESOURCE_PATH;
53
    }
54
}