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

Image   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 26
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getFilename() 0 4 1
A getSmallImageUrl() 0 4 1
A getLargeImageUrl() 0 4 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