Completed
Push — fix-checkstyle ( 525678...700890 )
by
unknown
03:06
created

Info::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 12
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 12
loc 12
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
namespace Akeneo\Crowdin\Api;
4
5
/**
6
 * Get project details
7
 *
8
 * @author Nicolas Dupont <[email protected]>
9
 * @see http://crowdin.net/page/api/info
10
 */
11 View Code Duplication
class Info extends AbstractApi
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function execute()
17
    {
18
        $path = sprintf(
19
            "project/%s/info?key=%s",
20
            $this->client->getProjectIdentifier(),
21
            $this->client->getProjectApiKey()
22
        );
23
        $request = $this->client->getHttpClient()->get($path);
24
        $response = $request->send();
25
26
        return $response->getBody(true);
27
    }
28
}
29