Completed
Push — master ( 1e2063...77648b )
by Tobias
03:30
created

LogoType   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 40
ccs 6
cts 9
cp 0.6667
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 6 1
A upload() 0 6 1
A delete() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Billogram\Api;
6
7
use Billogram\Model\LogoType\LogoType as Model;
8
use Psr\Http\Message\ResponseInterface;
9
10
/**
11
 * @author Ibrahim Hizeoui <[email protected]>
12
 */
13
class LogoType extends HttpApi
14
{
15
    /**
16
     * @return string|array
17
     *
18
     * @see https://billogram.com/api/documentation#logotype_fetch
19
     */
20 1
    public function get()
21
    {
22 1
        $response = $this->httpGet('/logotype');
23
24 1
        return $this->handleResponse($response, Model::class);
25
    }
26
27
    /**
28
     * @param array $logoType
29
     *
30
     * @return Model|ResponseInterface
31
     *
32
     * @see https://billogram.com/api/documentation#logotype_update
33
     */
34 1
    public function upload(array $logoType)
35
    {
36 1
        $response = $this->httpPost('/logotype', $logoType);
37
38 1
        return $this->handleResponse($response, Model::class);
39
    }
40
41
    /**
42
     * @return Model|ResponseInterface
43
     *
44
     * @see https://billogram.com/api/documentation#logotype_delete
45
     */
46
    public function delete()
47
    {
48
        $response = $this->httpDelete('/logotype');
49
50
        return $this->handleResponse($response, Model::class);
51
    }
52
}
53