HasTemplateWithImmutablePagesSize::setSize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
3
namespace LPDFBuilder\Generation;
4
5
trait HasTemplateWithImmutablePagesSize
6
{
7
    use HasTemplate;
8
9
    protected int $templatePageWidth  = 210;
10
    protected int $templatePageHeight = 297;
11
12
    public function setSize(int $templatePageWidth, int $templatePageHeight): static
13
    {
14
        $this->templatePageWidth  = $templatePageWidth;
15
        $this->templatePageHeight = $templatePageHeight;
16
17
        return $this;
18
    }
19
20
    public function setTemplatePageWidth(int $templatePageWidth): static
21
    {
22
        $this->templatePageWidth = $templatePageWidth;
23
24
        return $this;
25
    }
26
27
    public function setTemplatePageHeight(int $templatePageHeight): static
28
    {
29
        $this->templatePageHeight = $templatePageHeight;
30
31
        return $this;
32
    }
33
}
34