Completed
Push — master ( f2b799...761b51 )
by Tobias
04:02
created

LogoType   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 28
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get() 0 6 1
A upload() 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_calls
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_calls
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