Passed
Push — master ( de3d61...be839c )
by Alec
13:42 queued 13s
created

WidgetSettings   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
c 0
b 0
f 0
dl 0
loc 52
rs 10
wmc 9

9 Methods

Rating   Name   Duplication   Size   Complexity  
A getLeadingSpacer() 0 3 1
A setCharPattern() 0 4 1
A setLeadingSpacer() 0 4 1
A setTrailingSpacer() 0 4 1
A getStylePattern() 0 3 1
A __construct() 0 6 1
A getCharPattern() 0 3 1
A setStylePattern() 0 4 1
A getTrailingSpacer() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
6
namespace AlecRabbit\Spinner\Core\Settings;
7
8
use AlecRabbit\Spinner\Contract\IFrame;
9
use AlecRabbit\Spinner\Contract\Pattern\IPattern;
10
use AlecRabbit\Spinner\Core\Pattern\Contract\IStylePattern;
11
use AlecRabbit\Spinner\Core\Settings\Contract\IWidgetSettings;
12
13
final class WidgetSettings implements IWidgetSettings
14
{
15
    public function __construct(
16
        protected IFrame $leadingSpacer,
17
        protected IFrame $trailingSpacer,
18
        protected IStylePattern $stylePattern,
19
        protected IPattern $charPattern,
20
    ) {
21
    }
22
23
    public function getLeadingSpacer(): IFrame
24
    {
25
        return $this->leadingSpacer;
26
    }
27
28
    public function setLeadingSpacer(IFrame $frame): IWidgetSettings
29
    {
30
        $this->leadingSpacer = $frame;
31
        return $this;
32
    }
33
34
    public function getTrailingSpacer(): IFrame
35
    {
36
        return $this->trailingSpacer;
37
    }
38
39
    public function setTrailingSpacer(IFrame $frame): IWidgetSettings
40
    {
41
        $this->trailingSpacer = $frame;
42
        return $this;
43
    }
44
45
    public function getStylePattern(): IStylePattern
46
    {
47
        return $this->stylePattern;
48
    }
49
50
    public function setStylePattern(IStylePattern $pattern): IWidgetSettings
51
    {
52
        $this->stylePattern = $pattern;
53
        return $this;
54
    }
55
56
    public function getCharPattern(): IPattern
57
    {
58
        return $this->charPattern;
59
    }
60
61
    public function setCharPattern(IPattern $pattern): IWidgetSettings
62
    {
63
        $this->charPattern = $pattern;
64
        return $this;
65
    }
66
}
67