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

ImageUrlUpload::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 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