ColorBlockSvg   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
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 12
ccs 6
cts 6
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A image() 0 10 1
1
<?php
2
3
namespace Limsum\ColorBlock;
4
5
use Illuminate\Support\Facades\Response;
6
7
class ColorBlockSvg extends AbstractColorBlockImage
8
{
9 1
    public function image(): \Illuminate\Http\Response
10
    {
11 1
        return Response::make("
12 1
        <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 {$this->with} {$this->height}'>
13 1
          <rect width='{$this->with}' height='{$this->height}'
14 1
            fill='{$this->color}'
15
               />
16
        </svg>
17
       ", 200, [
18 1
           'Content-Type' => 'image/svg+xml',
19
       ]);
20
    }
21
}
22