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

ReverseRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
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
}