Passed
Push — master ( 200d88...9b81d7 )
by Alec
02:43 queued 15s
created

CustomStylePattern   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A pattern() 0 3 1
A __construct() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
// 09.03.23
5
6
namespace AlecRabbit\Spinner\Core\Pattern\Style;
7
8
use AlecRabbit\Spinner\Contract\StyleMode;
9
use AlecRabbit\Spinner\Core\Pattern\Style\A\AStylePattern;
10
use Traversable;
11
12
/** @psalm-suppress UnusedClass */
13
final class CustomStylePattern extends AStylePattern
14
{
15
    public function __construct(
16
        protected iterable $pattern,
17
        protected StyleMode $styleMode = self::STYLE_MODE,
18
        ?int $interval = null,
19
        bool $reversed = false
20
    ) {
21
        parent::__construct($interval, $reversed);
22
    }
23
24
//    public function __construct(
25
//        protected iterable $pattern,
26
//        ?int $interval = null,
27
//        bool $reversed = false,
28
//        protected StyleMode $styleMode = self::STYLE_MODE
29
//    ) {
30
//        parent::__construct($interval, $reversed);
31
//    }
32
    protected function pattern(): Traversable
33
    {
34
        yield from $this->pattern;
35
    }
36
}
37