AbstractColorBlockImage   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 35
ccs 4
cts 4
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace Limsum\ColorBlock;
4
5
use Illuminate\Http\Response;
6
7
abstract class AbstractColorBlockImage
8
{
9
10
    /**
11
     * @var float
12
     */
13
    protected float $with;
14
15
    /**
16
     * @var float
17
     */
18
    protected float $height;
19
20
    /**
21
     * @var string
22
     */
23
    protected string $color;
24
25
    /**
26
     * @param float $with
27
     * @param float $height
28
     * @param string $color
29
     */
30 2
    public function __construct(float $with = 100, float $height = 100, string $color = '#808080')
31
    {
32 2
        $this->with   = $with;
33 2
        $this->height = $height;
34 2
        $this->color  = $color;
35
    }
36
37
    /**
38
     * @return Response
39
     * @throws \Exception
40
     */
41
    abstract public function image(): Response;
42
}
43