Passed
Push — master ( 823aee...b9b37f )
by Alec
13:15 queued 12s
created

Custom::pattern()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
// 09.03.23
5
6
namespace AlecRabbit\Spinner\Core\Pattern\Char;
7
8
use AlecRabbit\Spinner\Core\Pattern\A\AReversiblePattern;
9
use Traversable;
10
11
/** @psalm-suppress UnusedClass */
12
final class Custom extends AReversiblePattern
13
{
14
    public function __construct(
15
        protected iterable $pattern,
16
        ?int $interval = null,
17
        bool $reversed = false
18
    ) {
19
        parent::__construct($interval, $reversed);
20
    }
21
22
    protected function pattern(): Traversable
23
    {
24
        yield from $this->pattern;
25
    }
26
}
27