SupportedLanguages::execute()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 7
nc 2
nop 0
1
<?php
2
3
namespace Akeneo\Crowdin\Api;
4
5
/**
6
 * Get supported languages list
7
 *
8
 * @author Nicolas Dupont <[email protected]>
9
 * @see https://crowdin.com/page/api/supported-languages
10
 */
11
class SupportedLanguages extends AbstractApi
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function execute()
17
    {
18
        $path = 'supported-languages';
19
        
20
        if (!empty($this->urlParameters)) {
21
            $path .= sprintf('?%s', $this->getUrlQueryString());
22
        }
23
        
24
        $http     = $this->client->getHttpClient();
25
        $response = $http->get($path);
26
27
        return $response->getBody();
28
    }
29
}
30