Completed
Push — master ( 0007a1...a3ef5a )
by John
02:23
created

OutlineBoxRenderer::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 11
CRAP Score 1.0005

Importance

Changes 0
Metric Value
dl 0
loc 18
ccs 11
cts 12
cp 0.9167
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 11
nc 1
nop 0
crap 1.0005
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 1
        );
28
29 1
        return $canvas;
30
    }
31
}
32