Completed
Push — master ( 4984e7...9ad690 )
by John
03:58
created

OutlineBoxRenderer   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 24
rs 10
c 0
b 0
f 0
ccs 10
cts 10
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 18 1
1
<?php
2
3
namespace Graze\CiffRenderer\Field\Renderer\GraphicPrimitive;
4
5
use Graze\CiffRenderer\Field\Renderer\GraphicPrimitive\AbstractGraphicPrimitiveRenderer;
6
use Graze\CiffRenderer\Field\Renderer\AbstractRenderer;
7
8
class OutlineBoxRenderer extends AbstractGraphicPrimitiveRenderer
9
{
10
    /**
11
     * @return Intervention/Image/Image
0 ignored issues
show
Documentation introduced by
The doc-type Intervention/Image/Image could not be parsed: Unknown type name "Intervention/Image/Image" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
12
     */
13 1
    public function render()
14
    {
15 1
        $canvas = $this->getImageManager()->canvas($this->getWidth(), $this->getHeight(), $this->getTracerColour());
16
17 1
        $rectangleConf = function ($rectangle) {
18
            $rectangle->border($this->getLineWeight(), '#000');
19 1
        };
20
21 1
        $canvas->rectangle(
22 1
            0,
23 1
            0,
24 1
            $this->getWidth() - $this->getLineWeight(),
25 1
            $this->getHeight() - $this->getLineWeight(),
26
            $rectangleConf
27
        );
28
29 1
        return $canvas;
30
    }
31
}
32