Completed
Push — master ( 73b08b...9131b2 )
by Laurens
02:28
created

ImageUrlUpload   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getPostBodyData() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\IzettleApi\Client\Image;
6
7
final class ImageUrlUpload implements ImageUploadRequestInterface
8
{
9
    private $imageUrl;
10
11 3
    public function __construct(string $imageUrl)
12
    {
13 3
        $this->imageUrl = $imageUrl;
14 3
    }
15
16 2
    public function getPostBodyData(): string
17
    {
18
        $data = [
19 2
            'imageUrl' => $this->imageUrl
20
        ];
21
22 2
        return json_encode($data);
23
    }
24
}
25