Statistics   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 14
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getStatistics() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace BabDev\Transifex\Connector;
4
5
use BabDev\Transifex\ApiConnector;
6
use Psr\Http\Message\ResponseInterface;
7
8
/**
9
 * Transifex API Statistics class.
10
 *
11
 * @link http://docs.transifex.com/api/statistics/
12
 */
13
final class Statistics extends ApiConnector
14
{
15
    /**
16
     * Get statistics on a specified resource.
17
     *
18
     * @param string $project  The slug for the project to pull from
19
     * @param string $resource The slug for the resource to pull from
20
     * @param string $lang     An optional language code to return data only for a specified language
21
     *
22
     * @return ResponseInterface
23
     */
24 2
    public function getStatistics(string $project, string $resource, string $lang = ''): ResponseInterface
25
    {
26 2
        return $this->client->sendRequest($this->createRequest('GET', $this->createUri("/api/2/project/$project/resource/$resource/stats/$lang")));
27
    }
28
}
29