Test Failed
Push — master ( 328aea...ff1469 )
by Bence
03:25
created

WrapItApiHelper::request()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
cc 1
eloc 5
nc 1
nop 2
crap 2
1
<?php
2
3
namespace WrapIt\Helpers;
4
5
use WrapIt\WrapIt;
6
use WrapIt\Exceptions\WrapItParameterException;
7
use WrapIt\Exceptions\WrapItResponseException;
8
use WrapIt\Http\WrapItApiRequester;
9
use WrapIt\Helpers\Helper;
10
11
/**
12
 * Class WrapItApiHelper
13
 *
14
 * @package WrapIt
15
 */
16
class WrapItApiHelper extends Helper {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type WrapIt\Helpers\WrapItApiHelper has been defined more than once; this definition is ignored, only the first definition in src/WrapIt/Helpers/Helper.php (L15-31) is considered.

This check looks for classes that have been defined more than once.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
17
18
    public function request($api, $data) {
19
        return $this->api_requester->post($api, array_merge([
20
            "client_id" => $this->client_id,
21
            "client_secret" => $this->client_secret
22
        ], $data));
23
    }
24
}
25