Completed
Push — master ( c701d2...413780 )
by WEBEWEB
02:27
created

CommuneProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A communes() 0 6 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\Provider;
13
14
use WBW\Library\Core\Exception\ApiException;
15
use WBW\Library\GeoAPI\Model\Request\Commune\CommunesRequest;
16
use WBW\Library\GeoAPI\Model\Response\CommunesResponse;
17
use WBW\Library\GeoAPI\Serializer\DecoupageAdministratifResponseDeserializer;
18
19
/**
20
 * Commune provider.
21
 *
22
 * @author webeweb <https://github.com/webeweb/>
23
 * @package WBW\Library\GeoAPI\Provider
24
 */
25
class CommuneProvider extends DecoupageAdministratifProvider {
26
27
    /**
28
     * Communes.
29
     *
30
     * @param CommunesRequest $request The communes request.
31
     * @return CommunesResponse Returns the communes response.
32
     * @throws ApiException Throws an API exception if an error occurs.
33
     */
34
    public function communes(CommunesRequest $request) {
35
36
        $rawResponse = $this->callApi($request, []);
37
38
        return DecoupageAdministratifResponseDeserializer::deserializeCommunesResponse($rawResponse);
39
    }
40
}