Passed
Push — master ( 9ff768...b736eb )
by Laurens
02:33
created

Image::__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
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\IzettleApi\API;
6
7
final class Image
8
{
9
    const BASE_URL = 'https://image.izettle.com/productimage/';
10
11
    private $filename;
12
13 9
    public function __construct($filename)
14
    {
15 9
        $this->filename = $filename;
16 9
    }
17
18 10
    public function getFilename(): string
19
    {
20 10
        return $this->filename;
21
    }
22
23 1
    public function getSmallImageUrl(): string
24
    {
25 1
        return self::BASE_URL . 'L/' . $this->getFilename();
26
    }
27
28 1
    public function getLargeImageUrl(): string
29
    {
30 1
        return self::BASE_URL . 'o/' . $this->getFilename();
31
    }
32
}
33